  <script type="text/javascript">
      var NV_PATH = '/';
      var NV_HOST = 'www.netvibes.com';
      var NV_STATIC = 'http://cdn.netvibes.com';
      var NV_ECO = 'eco.netvibes.com';
      var NV_MODULES = 'nvmodules2.netvibes.com';
      var NV_AVATARS = 'avatars.netvibes.com';
      var NV_FAQ = 'faq.netvibes.com';
      var App = {
		"dontStart":false,
		"lang":"zh_CN",
		"shortLang":"zh",
		"locale":"cn",
		"mode":"userPage",
		"showErrors":false,
		"useMergedCss":true,
		"use_compressed_js":true,
		"use_prefetcheddata":false,
		"newUser":false,
		"noResize":false,
		"registeredUser":true,
		"enableStats":true,
		"eTag":true,
		"queryStart":"",
		"userData":{
			"status":"ok","pageTitle":"Never Surrender to Complexity",
			"custom":{
				"themeUrl":"\/themes\/garlic\/screen.css",
				"themeTitle":"Garlic",
				"numCol":"3",
				"showTitle":"1",
				"showFeedNav":"1",
				"rssSpace":"0",
				"hideFavIcons":"0",
				"dontPreload":"1",
				"keyboardNav":"0",
				"hideSearch":"1",
				"unreadPosition":"left",
				"enableFx":"1",
				"announcement":"[]",
				"headerBackground":"\/img\/headers\/4seasons.jpg"},
			"userFeeds":"21065871",
			"userEmail":"flashjay@163.com",
			"username":"flashjay",
			"tabs":[
				{"id":"82349054",
				 "title":"\u7efc\u5408",
				 "icon":"http:\/\/www.netvibes.com\/img\/icons\/house.gif",
				 "cols":"3",
				 "unread":"0",
				 "access":"private",
				 "columnSizes":["375","391","383","0"]},
				{"id":"82349055","title":"\u4e92\u8054\u7f51","icon":"http:\/\/www.netvibes.com\/img\/icons\/vcard.gif","cols":"3","unread":"0","access":"private","columnSizes":["1","1","1","0"]},
				{"id":"82349056","title":"\u8da3\u5473","icon":"http:\/\/www.netvibes.com\/img\/icons\/color_swatch.gif","cols":"3","unread":"0","access":"private","columnSizes":["1","1","1","0"]},
				{"id":"100560284","title":"chinaunix","icon":"","cols":"3","unread":"0","access":"private","columnSizes":["1","1","1","0"]},
				{"id":"100560288","title":"lamp~","icon":"http:\/\/cdn.netvibes.com\/img\/icons\/page_white_php.gif","cols":"4","unread":"0","access":"private","columnSizes":["1","1","1","1"]},
				{"id":"102381675","title":"\u7f16\u7a0b","icon":"http:\/\/cdn.netvibes.com\/img\/icons\/flag_red.gif","cols":"3","unread":"0","access":"private","columnSizes":["1","1","1","0"]},
				{"id":"100562671","title":"\u4e92\u8054\u7f51100\u7ad9","icon":"http:\/\/cdn.netvibes.com\/img\/icons\/page_white_world.gif","cols":"3","unread":"0","access":"private","columnSizes":["391","423","407","0"]},
				{"id":"100570999","title":"\u5317\u4eac2008~","icon":"http:\/\/cdn.netvibes.com\/img\/icons\/computer.gif","cols":"3","unread":"0","access":"private","columnSizes":["1","1","1","0"]},
				{"id":"100571010","title":"\u8bfb\u4e66\u5566","icon":"","cols":"2","unread":"0","access":"private","columnSizes":["589","632","0","0"]},
				{"id":"100571006","title":"\u53c8\u65e0\u804a\u4e86","icon":"","cols":"3","unread":"0","access":"private","columnSizes":["344","510","367","0"]}],
			"modules":[
				{"id":"808670540","widgetId":null,"col":"1","row":"1000","tab":"82349054","name":"Weather","status":"1","title":"Weather","data":{"unit":"1","town":"CHXX0140","color":"blue","history":""}},
				{"id":"808670541","widgetId":null,"col":"1","row":"2000","tab":"82349054","name":"PostIt","status":"1","title":"\u5c0f\u5c0f\u8bb0\u4e8b\u672c","data":{"color":"white","text":"\u6b22\u8fce\u6765\u5230Netvibes! \n","font":"Tahoma","size":"11px","history":""}},
				{"id":"808670542","widgetId":null,"col":"1","row":"3000","tab":"82349054","name":"TodoList","status":"1","title":"Liste de t\u00e2ches","data":{"color":"orange","history":""}},
				{"id":"808670546","widgetId":null,"col":"2","row":"1000","tab":"82349054","name":"Vibes","status":"1","title":"\u56fe\u7247\u641c\u7d22","data":{"search":"\u4e2d\u56fd\u98ce\u5149","viewmode":"1","keepSearch":"true","old":"","selected":"0","type":"image","engines":"55,53,50,49,46","size":"1","title":"\u56fe\u7247\u641c\u7d22","nbTabs":"4","converted":"false","_type":"image","history":""}},
				{"id":"808670544","widgetId":null,"col":"2","row":"2000","tab":"82349054","name":"MultipleFeeds","status":"1","title":"Google \u8d44\u8baf \u4e2d\u56fd\u7248 - \u5185\u5730","data":{"provider":"google","title":"Google","category":"cn","list_cn":"0,1,2,3","selectedTab":"1","nbTitles":"5","details":"true","showDate":"true","openOutside":"false","color":"yellow","history":""}},
				{"id":"808670543","widgetId":null,"col":"3","row":"1000","tab":"82349054","name":"Vibes","status":"1","title":"\u7f51\u7edc\u641c\u7d22","data":{"search":"","viewmode":"1","selected":"1","keepSearch":"true","old":"","type":"web","engines":"2,24,25,19,3,21,16","size":"1","title":"\u7f51\u7edc\u641c\u7d22","nbTabs":"4","converted":"false","_type":"web","history":""}},
				{"id":"808670547","widgetId":null,"col":"1","row":"1000","tab":"82349055","name":"MailWizard","status":"1","title":"Assistant e-mail","data":{"color":"green","history":""}},
				{"id":"808670548","widgetId":null,"col":"2","row":"1000","tab":"82349055","name":"Facebook","status":"1","title":"Facebook","data":{"uid":"","color":"blue","history":""}},
				{"id":"808670549","widgetId":null,"col":"3","row":"1000","tab":"82349055","name":"Vibes","status":"1","title":"\u5546\u54c1\u641c\u7d22","data":{"converted":"false","type":"shopping","title":"\u5546\u54c1\u641c\u7d22","search":"mp3","old":"","engines":"115,129,116","_type":"shopping","color":"yellow","history":""}},
				{"id":"808670550","widgetId":null,"col":"1","row":"1000","tab":"82349056","name":"UWA","status":"1","title":"\u7ecf\u5178\u6e38\u620f \u4e09\u56fd\u5fd7","data":{"moduleUrl":"http:\/\/act.blog.sohu.com\/widgets\/sanguo.xhtml","color":"red","history":""}},
				{"id":"810779788","widgetId":null,"col":"2","row":"500","tab":"82349056","name":"Vibes","status":"1","title":"\u89c6\u9891\u641c\u7d22","data":{"type":"video","title":"\u89c6\u9891\u641c\u7d22","engines":"60,65,62,67,68"}},
				{"id":"808670551","widgetId":null,"col":"2","row":"1000","tab":"82349056","name":"Vibes","status":"1","title":"\u64ad\u5ba2\u641c\u7d22","data":{"converted":"false","type":"podcast","title":"\u64ad\u5ba2\u641c\u7d22","search":"a","old":"","engines":"70,71,72,73","_type":"podcast","color":"green","history":"","searchHistory":"a:\u9648\u5955\u8fc5","viewmode":"2"}},
				{"id":"808670552","widgetId":null,"col":"3","row":"1000","tab":"82349056","name":"Vibes","status":"1","title":"\u89c6\u9891\u641c\u7d22","data":{"search":"\u9648\u5955\u8fc5","selected":"2","keepSearch":"true","old":"","type":"video","engines":"60,62,65,67,68","size":"0","title":"\u89c6\u9891\u641c\u7d22","nbTabs":"4","viewmode":"1","converted":"false","_type":"video","color":"yellow","history":"","searchHistory":"\u9648\u5955\u8fc5"}},
				{"id":"809393745","widgetId":null,"col":"1","row":"31","tab":"100560284","name":"RssReader","status":"1","title":"ChinaUnix.net - MySQL","data":{"feedId":"5185268","feedUrl":"http:\/\/bbs.chinaunix.net\/rss.php?fid=17"}},
				{"id":"809393112","widgetId":null,"col":"1","row":"62.5","tab":"100560284","name":"RssReader","status":"1","title":"ChinaUnix.net\u8bba\u575b - \u539f\u521b_\u7cbe\u534e_\u7cbe\u5f69_\u4fdd\u7559","data":{"feedId":"7125","showPage":"1","feedUrl":"http:\/\/bbs.chinaunix.net\/rss\/all_jh.xml","history":"7dhkz6"}},
				{"id":"809393062","widgetId":null,"col":"1","row":"125","tab":"100560284","name":"RssReader","status":"0","title":"ChinaUnix.net - IT\u4e1a\u754c\u65b0\u95fb\u4e0e\u8bc4\u8bba","data":{"feedId":"11945","feedUrl":"http:\/\/bbs.chinaunix.net\/rss\/46.xml"}},
				{"id":"809393611","widgetId":null,"col":"2","row":"500","tab":"100560284","name":"RssReader","status":"1","title":"ChinaUnix.net - Php","data":{"feedId":"5185260","showPage":"1","feedUrl":"http:\/\/bbs.chinaunix.net\/rss.php?fid=27","history":"1ds2f4:4skc2o:323dp4:k4gw2v"}},
				{"id":"809393526","widgetId":null,"col":"2","row":"1000","tab":"100560284","name":"RssReader","status":"1","title":"ChinaUnix.net - C\/C++","data":{"feedId":"5185257","showPage":"1","feedUrl":"http:\/\/bbs.chinaunix.net\/rss.php?fid=23","history":"dixtbb:4h2u0y:9ghb7o:41qqaw:2agyzu:t93he:rrxgh0:ni71ig:tih4wp:9rfbsv:6z7zxr:vupush:d0i5pw"}},
				{"id":"809393675","widgetId":null,"col":"3","row":"1000","tab":"100560284","name":"RssReader","status":"1","title":"ChinaUnix.net - Web\u5f00\u53d1","data":{"feedId":"5185265","showPage":"1","feedUrl":"http:\/\/bbs.chinaunix.net\/rss.php?fid=80","history":"jtwbxf:pcn45l"}},
				{"id":"809393869","widgetId":"228804","col":"1","row":"125","tab":"100560288","name":"TodoList","status":"0","title":"lamp Category","data":{"title":"lamp Category","tdval_0":"\u719f\u6089\u6e90\u7801\uff1f \u54c7\u9760\uff0c\u6210\u795e\u4e86\uff01","nbTodo":"1"}},
				{"id":"809390541","widgetId":null,"col":"1","row":"250","tab":"100560288","name":"RssReader","status":"1","title":"AmpJuke","data":{"feedId":"537802","feedUrl":"www.ampjuke.org\/ampjuke.xml"}},
				{"id":"828366291","widgetId":null,"col":"1","row":"1250","tab":"100560288","name":"RssReader","status":"0","title":"PHP.net news & announcements","data":{"feedId":"2259656","showPage":"1","feedUrl":"http:\/\/www.php.net\/feed.atom","history":"nu1ur4"}},
				{"id":"828364844","widgetId":null,"col":"2","row":"500","tab":"100560288","name":"RssReader","status":"1","title":"phpPatterns","data":{"feedId":"81651","feedUrl":"http:\/\/www.phppatterns.com\/feed.php"}},
				{"id":"809390521","widgetId":null,"col":"2","row":"1000","tab":"100560288","name":"RssReader","status":"1","title":"One Apache tip a day","data":{"feedId":"1217650","feedUrl":"http:\/\/feeds.feedburner.com\/OneApacheTipADay"}},
				{"id":"829863482","widgetId":null,"col":"3","row":"1000","tab":"100560288","name":"RssReader","status":"1","title":"PHP Classes: Latest entries","data":{"feedId":"1265357","feedUrl":"http:\/\/feeds.feedburner.com\/phpclasses","history":"ggvwcs"}},
				{"id":"829125159","widgetId":null,"col":"3","row":"2000","tab":"100560288","name":"RssReader","status":"1","title":"PHPDeveloper.org","data":{"feedId":"5071194","showPage":"1","feedUrl":"http:\/\/www.phpdeveloper.org\/feed","history":"jtxv9p"}},
				{"id":"829124410","widgetId":null,"col":"4","row":"1500","tab":"100560288","name":"RssReader","status":"1","title":"Open Source Web Development Tutorials - RSS Feeds","data":{"feedId":"54573","showPage":"1","feedUrl":"http:\/\/www.devshed.com\/rss.xml","history":"ustr1v"}},
				{"id":"809390498","widgetId":null,"col":"4","row":"2000","tab":"100560288","name":"RssReader","status":"0","title":"phpforum.de","data":{"feedId":"1426157","feedUrl":"http:\/\/www.phpforum.de\/index.php?369&type=100"}},
				{"id":"809304384","widgetId":null,"col":"4","row":"3000","tab":"100560288","name":"RssReader","status":"1","title":"\u8f66\u4e1c[Blog^2]","data":{"feedId":"6061","details":"true","nbTitles":"3","showPage":"1","feedUrl":"http:\/\/www.chedong.com\/blog\/index.rdf","history":"a5zg6x:oks0sg:ioe8e:je1lox:yyb6di:uzackq"}},
				{"id":"809352910","widgetId":null,"col":"1","row":"500","tab":"100562671","name":"MultipleFeeds","status":"1","title":"\u641c\u72d0\u7126\u70b9\u65b0\u95fb","data":{"provider":"sohu_news","category":"default","list_default":"0,1,2,3","history_0":"hi5dke:fgf5x2:2lnmxi","showPage":"1","selectedTab":"0","nbTitles":"5","history_3":"kfyeuk"}},
				{"id":"809295467","widgetId":null,"col":"1","row":"1500","tab":"100562671","name":"MultipleFeeds","status":"1","title":"PChome \u7535\u8111\u4e4b\u5bb6","data":{"provider":"pchomenet","category":"default","list_default":"0,1,2,3","history_0":"r5fk2n:twadga","showPage":"1","selectedTab":"0"}},
				{"id":"809309062","widgetId":null,"col":"2","row":"1000","tab":"100562671","name":"MultipleFeeds","status":"1","title":"undefined","data":{"provider":"daqi","title":"Daqi","ecoId":"229308","category":"default","list_default":"0,1,2,3","history_0":"4ykxpb","showPage":"1","selectedTab":"0","nbTitles":"5","history_1":"trdt6q:xyi06i"}},
				{"id":"809296442","widgetId":null,"col":"2","row":"2000","tab":"100562671","name":"RssReader","status":"1","title":"\u6267\u7740\u3001\u6295\u5165\u3001\u6536\u83b7 - \u6682\u65f6\u4fdd\u5bc6 - \u548c\u8baf\u535a\u5ba2","data":{"feedId":"1070264","showPage":"1","feedUrl":"http:\/\/blog.hexun.com\/kentlai\/rss2.aspx","history":"9r5ujo:1i5gmn:795v4b:pv2lgl"}},
				{"id":"809295632","widgetId":null,"col":"2","row":"3000","tab":"100562671","name":"RssReader","status":"1","title":"\u4ed8\u4eae\u7684\u6b6a\u8bc4\u778e\u8bba - fjliang - \u548c\u8baf\u535a\u5ba2","data":{"feedId":"18155","feedUrl":"http:\/\/blog.hexun.com\/fjliang\/rss2.aspx","history":"tkj3ax"}},
				{"id":"809395730","widgetId":"228804","col":"3","row":"1000","tab":"100562671","name":"TodoList","status":"1","title":"web100 Category","data":{"title":"web100 Category","tdval_0":"Collect famous site ^_^","nbTodo":"1"}},
				{"id":"812457311","widgetId":null,"col":"1","row":"125","tab":"100571006","name":"Eco","status":"1","title":"\u6700\u65b0\u7684Widgets","data":{"search":"mp3"}},
				{"id":"809352951","widgetId":"228829","col":"1","row":"1500","tab":"100571006","name":"UWA","status":"1","title":"\u53fd\u6b6a","data":{"moduleUrl":"http:\/\/api.jiwai.de\/uwa\/index.xhtml","height":"226","withFriends":"false","updateBox":"false","numDisplay":"3"}},
				{"id":"809396110","widgetId":null,"col":"2","row":"750","tab":"100571006","name":"Vibes","status":"1","title":"\u89c6\u9891\u641c\u7d22","data":{"type":"video","title":"\u89c6\u9891\u641c\u7d22","engines":"60,65,62,67,68","search":"\u6881\u9759\u8339","searchHistory":"\u6881\u9759\u8339:\u5f20\u5b66\u53cb:\u597d","selected":"0","color":"red"}},
				{"id":"812459269","widgetId":"228829","col":"3","row":"1000","tab":"100571006","name":"UWA","status":"1","title":"MP3 Player","data":{"moduleUrl":"http:\/\/www.yourminis.com\/embed\/netvibesUWA.aspx?gallery=1&uri=yourminis\/yourminis\/mini:mp3&uniqueID=d0211b9e-3d60-41b2-9046-9efe2d875b92","ecoId":"203074","height":"207","embedtxt":"alpha=77&color=95215&uri=yourminis%2Fyourminis%2Fmini%3Amp3&container=1&height=180&xheight=190&xwidth=358&width=348&swfurl=%2Fwidget%5Fmp3%2Eswf&playerver=WIN%209%2C0%2C115%2C0&majorver=9&"}},
				{"id":"809396115","widgetId":null,"col":"3","row":"2000","tab":"100571006","name":"Vibes","status":"1","title":"\u64ad\u5ba2\u641c\u7d22","data":{"type":"podcast","title":"\u64ad\u5ba2\u641c\u7d22","engines":"70,71,72,73","search":"jackson","searchHistory":"jackson: \u6881\u9759\u8339","selected":"1"}},
				{"id":"809353000","widgetId":null,"col":"1","row":"500","tab":"100571010","name":"RssReader","status":"1","title":"\u8c46\u74e3\u6700\u53d7\u6b22\u8fce\u7684\u5f71\u8bc4","data":{"feedId":"139832","showPage":"1","feedUrl":"http:\/\/www.douban.com\/feed\/review\/movie","history":"pg6ajf"}},
				{"id":"809352996","widgetId":null,"col":"2","row":"1000","tab":"100571010","name":"RssReader","status":"1","title":"\u8c46\u74e3\u6700\u53d7\u6b22\u8fce\u7684\u4e66\u8bc4","data":{"feedId":"17162","showPage":"1","feedUrl":"http:\/\/www.douban.com\/feed\/review\/book","history":"c79mhe:i4jfi9"}},
				{"id":"828364129","widgetId":null,"col":"1","row":"1000","tab":"102381675","name":"RssReader","status":"1","title":"Andreas Gohr: Weblog [splitbrain.org]","data":{"feedId":"327284","feedUrl":"http:\/\/feeds.feedburner.com\/splitbrain"}},
				{"id":"829962837","widgetId":null,"col":"2","row":"1000","tab":"102381675","name":"RssReader","status":"0","title":"\u968f\u7f51\u4e4b\u821e","data":{"feedId":"5212374","showPage":"1","feedUrl":"http:\/\/feed.feedsky.com\/dancewithnet","history":""}}
				]
			}
		}; 
	  var User = {
		  "username":"flashjay",
		  "numFriends":"1",
		  "numFollowers":"0",
		  "locale":"",
		  "Profile":{
			  "id":"62989636",
			  "gender":"male",
			  "birthday":false,
			  "biography":null,
			  "status":false,
			  "username":"flashjay",
			  "displayName":"flashjay",
			  "location":""
		  }};
      var AudioPlayer = {onInit:function(){}};
      var UWA = {};
  </script>
<script>
var MooTools={version:"1.2dev",build:"1374"};
var Native=function(J){
	J=J||{};
	var F=J.afterImplement||function(){};
	var G=J.generics;G=(G!==false);
	var H=J.legacy;
	var E=J.initialize;
	var B=J.protect;
	var A=J.name;
	var C=E||H;
	C.constructor=Native;
	C.$family={name:"native"};
	if(H&&E){C.prototype=H.prototype}
	C.prototype.constructor=C;
	if(A){
		var D=A.toLowerCase();
		C.prototype.$family={name:D};
		Native.typize(C,D)
	}
	var I=function(M,K,N,L){
		if(!B||L||!M.prototype[K]){M.prototype[K]=N}
		if(G){Native.genericize(M,K,B)}F.call(M,K,N);
		return M
	};
	C.implement=function(L,K,N){
		if(typeof L=="string"){return I(this,L,K,N)}
		for(var M in L){I(this,M,L[M],K)}
		return this
	};
	C.alias=function(K,M,L){
		K=this.prototype[K];
		if(K){I(this,M,K,L)}
		return this
	};
	return C
};
Native.implement=function(D,C){
	for(var B=0,A=D.length;B<A;B++){
		D[B].implement(C)
	}
};
Native.genericize=function(B,C,A){
	if((!A||!B[C])&&typeof B.prototype[C]=="function"){
		B[C]=function(){
			var D=Array.prototype.slice.call(arguments);
			return B.prototype[C].apply(D.shift(),D)
		}
	}
};
Native.typize=function(A,B){
	if(!A.type){
		A.type=function(C){
			return($type(C)===B)
		}
	}
};
(function(B){
	for(var A in B){
		Native.typize(B[A],A.toLowerCase())
	}
})({Boolean:Boolean,Native:Native,Object:Object});
(function(B){
	for(var A in B){
		//alert(A);
		new Native({name:A,initialize:B[A],protect:true})
	}
})({String:String,Function:Function,Number:Number,Array:Array,RegExp:RegExp,Date:Date});
(function(C,B){
	//alert(C);
	for(var D=0,A=B.length;D<A;D++){
		Native.genericize(C,B[D],true)
	}
	return arguments.callee
})(Array,["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice","toString","valueOf","indexOf","lastIndexOf"])
  (String,["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","valueOf"]);
function $chk(A){return !!(A||A===0)}
function $clear(A){clearTimeout(A);clearInterval(A);return null}
function $defined(A){return(A!=undefined)}
function $empty(){}
function $arguments(A){return function(){return arguments[A]}}
function $lambda(A){return(typeof A=="function")?A:function(){return A}}
function $extend(C,A){for(var B in (A||{})){C[B]=A[B]}return C}
function $unlink(C){
	var B=null;
	switch($type(C)){
		case"object":
			B={};
			for(var E in C){B[E]=$unlink(C[E])}
			break;
		case"array":
			B=[];
			for(var D=0,A=C.length;D<A;D++){B[D]=$unlink(C[D])}
			break;
		default:return C
	}
	return B
}
function $merge(){
	var E={};
	for(var D=0,A=arguments.length;D<A;D++){
		var B=arguments[D];
		if($type(B)!="object"){continue}
		for(var C in B){
			var G=B[C],F=E[C];E[C]=(F&&$type(G)=="object"&&$type(F)=="object")?$merge(F,G):$unlink(G)
		}
	}
	return E
}
function $pick(){
	for(var B=0,A=arguments.length;B<A;B++){
		if($defined(arguments[B])){return arguments[B]}
	}
	return null
}
function $random(B,A){return Math.floor(Math.random()*(A-B+1)+B)}
function $splat(B){var A=$type(B);return(A)?((A!="array"&&A!="arguments")?[B]:B):[]}
var $time=Date.now||function(){return new Date().getTime()};
function $try(B,D,A){try{return B.apply(D,$splat(A))}catch(C){return false}}
function $type(A){
	if(A==undefined){return false}if(A.$family){return(A.$family.name=="number"&&!isFinite(A))?false:A.$family.name}if(A.nodeName){switch(A.nodeType){case 1:return"element";case 3:return(/\S/).test(A.nodeValue)?"textnode":"whitespace"}}else{if(typeof A.length=="number"){if(A.callee){return"arguments"}else{if(A.item){return"collection"}}}}return typeof A}
var Hash=new Native({
	name:"Hash",initialize:function(A){if($type(A)=="hash"){A=$unlink(A.getClean())}for(var B in A){if(!this[B]){this[B]=A[B]}}return this}});
Hash.implement({
	getLength:function(){var B=0;for(var A in this){if(this.hasOwnProperty(A)){B++}}return B},forEach:function(B,C){for(var A in this){if(this.hasOwnProperty(A)){B.call(C,this[A],A,this)}}},getClean:function(){var B={};for(var A in this){if(this.hasOwnProperty(A)){B[A]=this[A]}}return B}});
Hash.alias("forEach","each");
function $H(A){return new Hash(A)}
Array.implement({forEach:function(C,D){for(var B=0,A=this.length;B<A;B++){C.call(D,this[B],B,this)}}});
Array.alias("forEach","each");
function $A(C){if($type(C)=="collection"){var D=[];for(var B=0,A=C.length;B<A;B++){D[B]=C[B]}return D}return Array.prototype.slice.call(C)}
function $each(C,B,D){var A=$type(C);((A=="arguments"||A=="collection"||A=="array")?Array:Hash).each(C,B,D)}
var Browser=new Hash({
	Engine:{name:"unknown",version:""},Platform:{name:(navigator.platform.match(/mac|win|linux|nix/i)||["other"])[0].toLowerCase()},Features:{xhr:!!(window.XMLHttpRequest),xpath:!!(document.evaluate),air:!!(window.runtime)}});
if(window.opera){Browser.Engine={name:"presto",version:(document.getElementsByClassName)?950:925}}
else{
	if(window.ActiveXObject){Browser.Engine={name:"trident",version:(Browser.Features.xhr)?5:4}}else{if(!navigator.taintEnabled){Browser.Engine={name:"webkit",version:(Browser.Features.xpath)?420:419}}else{if(document.getBoxObjectFor!=null){Browser.Engine.name="gecko"}}}}
Browser.Engine[Browser.Engine.name]=Browser.Engine[Browser.Engine.name+Browser.Engine.version]=true;
Browser.Platform[Browser.Platform.name]=true;
function $exec(B){
	if(!B){return B}if(window.execScript){window.execScript(B)}else{var A=document.createElement("script");A.setAttribute("type","text/javascript");A.text=B;document.head.appendChild(A);document.head.removeChild(A)}return B}
Native.UID=0;
var Window=new Native({
	name:"Window",legacy:window.Window,initialize:function(A){if(!A.Element){A.Element=$empty;if(Browser.Engine.webkit){A.document.createElement("iframe")}A.Element.prototype=(Browser.Engine.webkit)?window["[[DOMElement.prototype]]"]:{}}A.uid=Native.UID++;return $extend(A,Window.Prototype)},afterImplement:function(B,A){window[B]=Window.Prototype[B]=A}});
Window.Prototype={$family:{name:"window"}};
new Window(window);
var Document=new Native({
	name:"Document",legacy:window.Document,initialize:function(A){A.head=A.getElementsByTagName("head")[0];A.html=A.getElementsByTagName("html")[0];A.window=A.defaultView||A.parentWindow;if(Browser.Engine.trident4){$try(function(){A.execCommand("BackgroundImageCache",false,true)})}A.uid=Native.UID++;return $extend(A,Document.Prototype)},afterImplement:function(B,A){document[B]=Document.Prototype[B]=A}});
Document.Prototype={$family:{name:"document"}};
new Document(document);
Array.implement({
	every:function(C,D){for(var B=0,A=this.length;B<A;B++){if(!C.call(D,this[B],B,this)){return false}}return true},filter:function(D,E){var C=[];for(var B=0,A=this.length;B<A;B++){if(D.call(E,this[B],B,this)){C.push(this[B])}}return C},clean:function(){return this.filter($arguments(0))},indexOf:function(C,D){var A=this.length;for(var B=(D<0)?Math.max(0,A+D):D||0;B<A;B++){if(this[B]===C){return B}}return -1},map:function(D,E){var C=[];for(var B=0,A=this.length;B<A;B++){C[B]=D.call(E,this[B],B,this)}return C},some:function(C,D){for(var B=0,A=this.length;B<A;B++){if(C.call(D,this[B],B,this)){return true}}return false},associate:function(C){var D={},B=Math.min(this.length,C.length);for(var A=0;A<B;A++){D[C[A]]=this[A]}return D},link:function(C){var A={};for(var E=0,B=this.length;E<B;E++){for(var D in C){if(C[D](this[E])){A[D]=this[E];delete C[D];break}}}return A},contains:function(A,B){return this.indexOf(A,B)!=-1},extend:function(C){for(var B=0,A=C.length;B<A;B++){this.push(C[B])}return this},getLast:function(){return(this.length)?this[this.length-1]:null},getRandom:function(){return(this.length)?this[$random(0,this.length-1)]:null},include:function(A){if(!this.contains(A)){this.push(A)}return this},merge:function(C){for(var B=0,A=C.length;B<A;B++){this.include(C[B])}return this},remove:function(B){for(var A=this.length;A--;A){if(this[A]===B){this.splice(A,1)}}return this},empty:function(){this.length=0;return this},flatten:function(){var D=[];for(var B=0,A=this.length;B<A;B++){var C=$type(this[B]);if(!C){continue}D=D.concat((C=="array"||C=="collection"||C=="arguments")?Array.flatten(this[B]):this[B])}return D},hexToRgb:function(B){if(this.length!=3){return null}var A=this.map(function(C){if(C.length==1){C+=C}return C.toInt(16)});return(B)?A:"rgb("+A+")"},rgbToHex:function(D){if(this.length<3){return null}if(this.length==4&&this[3]==0&&!D){return"transparent"}var B=[];for(var A=0;A<3;A++){var C=(this[A]-0).toString(16);B.push((C.length==1)?"0"+C:C)}return(D)?B:"#"+B.join("")}});
Function.implement({
	extend:function(A){for(var B in A){this[B]=A[B]}return this},create:function(B){var A=this;B=B||{};return function(D){var C=B.arguments;C=$defined(C)?$splat(C):Array.slice(arguments,(B.event)?1:0);if(B.event){C=[D||window.event].extend(C)}var E=function(){return A.apply(B.bind||null,C)};if(B.delay){return setTimeout(E,B.delay)}if(B.periodical){return setInterval(E,B.periodical)}if(B.attempt){return $try(E)}return E()}},pass:function(A,B){return this.create({"arguments":A,bind:B})},attempt:function(A,B){return this.create({"arguments":A,bind:B,attempt:true})()},bind:function(B,A){return this.create({bind:B,"arguments":A})},bindWithEvent:function(B,A){return this.create({bind:B,event:true,"arguments":A})},delay:function(B,C,A){return this.create({delay:B,bind:C,"arguments":A})()},periodical:function(A,C,B){return this.create({periodical:A,bind:C,"arguments":B})()},run:function(A,B){return this.apply(B,$splat(A))}});
Number.implement({
	limit:function(B,A){return Math.min(A,Math.max(B,this))},round:function(A){A=Math.pow(10,A||0);return Math.round(this*A)/A},times:function(B,C){for(var A=0;A<this;A++){B.call(C,A,this)}},toFloat:function(){return parseFloat(this)},toInt:function(A){return parseInt(this,A||10)}});
Number.alias("times","each");
(function(B){
	var A={};B.each(function(C){if(!Number[C]){A[C]=function(){return Math[C].apply(null,[this].concat($A(arguments)))}}});Number.implement(A)})(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]);
String.implement({
	test:function(A,B){return((typeof A=="string")?new RegExp(A,B):A).test(this)},contains:function(A,B){return(B)?(B+this+B).indexOf(B+A+B)>-1:this.indexOf(A)>-1},trim:function(){return this.replace(/^\s+|\s+$/g,"")},clean:function(){return this.replace(/\s+/g," ").trim()},camelCase:function(){return this.replace(/-\D/g,function(A){return A.charAt(1).toUpperCase()})},hyphenate:function(){return this.replace(/[A-Z]/g,function(A){return("-"+A.charAt(0).toLowerCase())})},capitalize:function(){return this.replace(/\b[a-z]/g,function(A){return A.toUpperCase()})},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},toInt:function(A){return parseInt(this,A||10)},toFloat:function(){return parseFloat(this)},hexToRgb:function(B){var A=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(A)?A.slice(1).hexToRgb(B):null},rgbToHex:function(B){var A=this.match(/\d{1,3}/g);return(A)?A.rgbToHex(B):null},stripScripts:function(B){var A="";var C=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(){A+=arguments[1]+"\n";return""});if(B===true){$exec(A)}else{if($type(B)=="function"){B(A,C)}}return C}});
Hash.implement({
	has:Object.prototype.hasOwnProperty,keyOf:function(B){for(var A in this){if(this.hasOwnProperty(A)&&this[A]===B){return A}}return null},hasValue:function(A){return(Hash.keyOf(this,A)!==null)},extend:function(A){Hash.each(A,function(C,B){Hash.set(this,B,C)},this);return this},merge:function(A){Hash.each(A,function(C,B){Hash.include(this,B,C)},this);return this},remove:function(A){if(this.hasOwnProperty(A)){delete this[A]}return this},get:function(A){return(this.hasOwnProperty(A))?this[A]:null},set:function(A,B){if(!this[A]||this.hasOwnProperty(A)){this[A]=B}return this},empty:function(){Hash.each(this,function(B,A){delete this[A]},this);return this},include:function(B,C){var A=this[B];if(!$defined(A)){this[B]=C}return this},map:function(B,C){var A=new Hash;Hash.each(this,function(E,D){A.set(D,B.call(C,E,D,this))},this);return A},filter:function(B,C){var A=new Hash;Hash.each(this,function(E,D){if(B.call(C,E,D,this)){A.set(D,E)}},this);return A},every:function(B,C){for(var A in this){if(this.hasOwnProperty(A)&&!B.call(C,this[A],A)){return false}}return true},some:function(B,C){for(var A in this){if(this.hasOwnProperty(A)&&B.call(C,this[A],A)){return true}}return false},getKeys:function(){var A=[];Hash.each(this,function(C,B){A.push(B)});return A},getValues:function(){var A=[];Hash.each(this,function(B){A.push(B)});return A},toQueryString:function(){var A=[];Hash.each(this,function(C,B){$splat(C).each(function(D){A.push(B+"="+encodeURIComponent(D))})});return A.join("&")}});
Hash.alias("keyOf","indexOf").alias("hasValue","contains").alias("remove","erase");
var Event=new Native({
	name:"Event",initialize:function(A,F){F=F||window;A=A||F.event;if(A.$extended){return A}this.$extended=true;var J=A.type;var G=A.target||A.srcElement;while(G&&G.nodeType==3){G=G.parentNode}if(J.test(/key/)){var B=A.which||A.keyCode;var L=Event.Keys.keyOf(B);if(J=="keydown"){var D=B-111;if(D>0&&D<13){L="f"+D}}L=L||String.fromCharCode(B).toLowerCase()}else{if(J.match(/(click|mouse|menu)/i)){var I={x:A.pageX||A.clientX+F.document.documentElement.scrollLeft,y:A.pageY||A.clientY+F.document.documentElement.scrollTop};var C={x:A.pageX?A.pageX-F.pageXOffset:A.clientX,y:A.pageY?A.pageY-F.pageYOffset:A.clientY};if(J.match(/DOMMouseScroll|mousewheel/)){var H=(A.wheelDelta)?A.wheelDelta/120:-(A.detail||0)/3}var E=(A.which==3)||(A.button==2);var K=null;if(J.match(/over|out/)){switch(J){case"mouseover":K=A.relatedTarget||A.fromElement;break;case"mouseout":K=A.relatedTarget||A.toElement}if((function(){while(K&&K.nodeType==3){K=K.parentNode}}).create({attempt:Browser.Engine.gecko})()===false){K=false}}}}return $extend(this,{event:A,type:J,page:I,client:C,rightClick:E,wheel:H,relatedTarget:K,target:G,code:B,key:L,shift:A.shiftKey,control:A.ctrlKey,alt:A.altKey,meta:A.metaKey})}});
Event.Keys=new Hash({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46});
Event.implement({
	stop:function(){return this.stopPropagation().preventDefault()},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation()}else{this.event.cancelBubble=true}return this},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault()}else{this.event.returnValue=false}return this}});
var Class=new Native({
	name:"Class",initialize:function(B){B=B||{};var A=function(){for(var D in this){this[D]=$unlink(this[D])}this.parent=null;["Implements","Extends"].each(function(E){if(!this[E]){return }Class[E](this,this[E]);delete this[E]},this);this.constructor=A;var C=(arguments[0]!==$empty&&this.initialize)?this.initialize.apply(this,arguments):this;if(this.options&&this.options.initialize){this.options.initialize.call(this)}return C};$extend(A,this);A.constructor=Class;A.prototype=B;return A}});
Class.implement({implement:function(){Class.Implements(this.prototype,Array.slice(arguments));return this}});
Class.Implements=function(A,B){$splat(B).each(function(C){$extend(A,($type(C)=="class")?new C($empty):C)})};
Class.Extends=function(C,A){
	A=new A($empty);for(var E in A){var B=A[E];var D=C[E];C[E]=(function(G,H){if($defined(H)&&G!=H){var F=$type(H);if(F!=$type(G)){return H}switch(F){case"function":return function(){H.parent=this.parent=G.bind(this);var I=H.apply(this,arguments);this.parent=H.parent;return I};case"object":return $merge(G,H);default:return H}}return G})(B,D)}};
Class.prototype.extend=function(A){A.Extends=this;return new Class(A)};
var Chain=new Class({
	chain:function(){this.$chain=(this.$chain||[]).extend(arguments);return this},callChain:function(){if(this.$chain&&this.$chain.length){this.$chain.shift().apply(this,arguments)}return this},clearChain:function(){if(this.$chain){this.$chain.empty()}return this}});
var Events=new Class({
	addEvent:function(C,B,A){if(B!=$empty){this.$events=this.$events||{};this.$events[C]=this.$events[C]||[];this.$events[C].include(B);if(A){B.internal=true}}return this},addEvents:function(A){for(var B in A){this.addEvent(B,A[B])}return this},fireEvent:function(C,B,A){if(!this.$events||!this.$events[C]){return this}this.$events[C].each(function(D){D.create({bind:this,delay:A,"arguments":B})()},this);return this},removeEvent:function(B,A){if(!this.$events||!this.$events[B]){return this}if(!A.internal){this.$events[B].remove(A)}return this},removeEvents:function(C){for(var D in this.$events){if(C&&C!=D){continue}var B=this.$events[D];for(var A=B.length;A--;A){this.removeEvent(D,B[A])}}return this}});
var Options=new Class({
	setOptions:function(){this.options=$merge.run([this.options].extend(arguments));if(!this.addEvent){return this}for(var A in this.options){if($type(this.options[A])!="function"||!(/^on[A-Z]/).test(A)){continue}this.addEvent(A,this.options[A]);delete this.options[A]}return this}});
Document.implement({
	newElement:function(A,B){if(Browser.Engine.trident&&B){["name","type","checked"].each(function(C){if(!B[C]){return }A+=" "+C+'="'+B[C]+'"';if(C!="checked"){delete B[C]}});A="<"+A+">"}return $.element(this.createElement(A)).set(B)},newTextNode:function(A){return this.createTextNode(A)},getDocument:function(){return this},getWindow:function(){return this.defaultView||this.parentWindow}});
var Element=new Native({
	name:"Element",legacy:window.Element,initialize:function(A,B){var C=Element.Constructors.get(A);if(C){return C(B)}if(typeof A=="string"){return document.newElement(A,B)}return $(A).set(B)},afterImplement:function(A,B){if(!Array[A]){Elements.implement(A,Elements.multi(A))}Element.Prototype[A]=B}});
Element.Prototype={$family:{name:"element"}};
Element.Constructors=new Hash;
var IFrame=new Native({
	name:"IFrame",generics:false,initialize:function(){Native.UID++;var E=Array.link(arguments,{properties:Object.type,iframe:$defined});var C=E.properties||{};var B=$(E.iframe)||false;var D=C.onload||$empty;delete C.onload;C.id=C.name=$pick(C.id,C.name,B.id,B.name,"IFrame_"+Native.UID);B=new Element(B||"iframe",C);var A=function(){var F=$try(function(){return B.contentWindow.location.host});if(F&&F==window.location.host){B.window=B.contentWindow;var H=new Window(B.window);var G=new Document(B.window.document);$extend(H.Element.prototype,Element.Prototype)}D.call(B.contentWindow)};(!window.frames[C.id])?B.addListener("load",A):A();return B}});
var Elements=new Native({
	initialize:function(F,B){B=$extend({ddup:true,cash:true},B);F=F||[];if(B.ddup||B.cash){var G={};var E=[];for(var C=0,A=F.length;C<A;C++){var D=$.element(F[C],!B.cash);if(B.ddup){if(G[D.uid]){continue}G[D.uid]=true}E.push(D)}F=E}return(B.cash)?$extend(F,this):F}});
Elements.implement({
	filterBy:function(A){if(!A){return this}return new Elements(this.filter((typeof A=="string")?function(B){return B.match(A)}:A))}});
Elements.multi=function(A){
	return function(){var B=[];var F=true;for(var D=0,C=this.length;D<C;D++){var E=this[D][A].apply(this[D],arguments);B.push(E);if(F){F=($type(E)=="element")}}return(F)?new Elements(B):B}};
Window.implement({
	$:function(B,C){if(B&&B.$attributes){return B}var A=$type(B);return($[A])?$[A](B,C,this.document):null},$$:function(A){if(arguments.length==1&&typeof A=="string"){return this.document.getElements(A)}var F=[];var C=Array.flatten(arguments);for(var D=0,B=C.length;D<B;D++){var E=C[D];switch($type(E)){case"element":E=[E];break;case"string":E=this.document.getElements(E,true);break;default:E=false}if(E){F.extend(E)}}return new Elements(F)},getDocument:function(){return this.document},getWindow:function(){return this}});

$.string=function(C,A,B){C=B.getElementById(C);return(C)?$.element(C,A):null};
$.element=function(A,B){A.uid=A.uid||[Native.UID++];if(!B&&Garbage.collect(A)&&!A.$family){$extend(A,Element.Prototype)}return A};
$.textnode=$.window=$.document=$arguments(0);
$.number=function(A){return Garbage.Elements[A]||null};

Native.implement(
	[Element,Document],{getElement:function(A,B){return $(this.getElements(A,true)[0]||null,B)},getElements:function(A,D){A=A.split(",");var C=[];var B=(A.length>1);A.each(function(E){var F=this.getElementsByTagName(E.trim());(B)?C.extend(F):C=F},this);return new Elements(C,{ddup:B,cash:!D})}});

Element.Storage={get:function(A){return(this[A]=this[A]||{})}};
Element.Inserters=new Hash({
	before:function(B,A){if(A.parentNode){A.parentNode.insertBefore(B,A)}},after:function(B,A){if(!A.parentNode){return }var C=A.nextSibling;(C)?A.parentNode.insertBefore(B,C):A.parentNode.appendChild(B)},bottom:function(B,A){A.appendChild(B)},top:function(B,A){var C=A.firstChild;(C)?A.insertBefore(B,C):A.appendChild(B)}});
Element.Inserters.inside=Element.Inserters.bottom;
Element.Inserters.each(function(C,B){
	var A=B.capitalize();Element.implement("inject"+A,function(D){Element.Inserters[B](this,$(D,true));return this});Element.implement("grab"+A,function(D){Element.Inserters[B]($(D,true),this);return this})});
Element.implement({
	getDocument:function(){return this.ownerDocument},getWindow:function(){return this.ownerDocument.getWindow()},getElementById:function(D,C){var B=this.ownerDocument.getElementById(D);if(!B){return null}for(var A=B.parentNode;A!=this;A=A.parentNode){if(!A){return null}}return $.element(B,C)},set:function(D,B){switch($type(D)){case"object":for(var C in D){this.set(C,D[C])}break;case"string":var A=Element.Properties.get(D);(A&&A.set)?A.set.apply(this,Array.slice(arguments,1)):this.setProperty(D,B)}return this},get:function(B){var A=Element.Properties.get(B);return(A&&A.get)?A.get.apply(this,Array.slice(arguments,1)):this.getProperty(B)},erase:function(B){var A=Element.Properties.get(B);(A&&A.erase)?A.erase.apply(this,Array.slice(arguments,1)):this.removeProperty(B);return this},match:function(A){return(!A||Element.get(this,"tag")==A)},inject:function(B,A){Element.Inserters.get(A||"bottom")(this,$(B,true));return this},wraps:function(B,A){B=$(B,true);return this.replaces(B).grab(B)},grab:function(B,A){Element.Inserters.get(A||"bottom")($(B,true),this);return this},appendText:function(B,A){return this.grab(this.getDocument().newTextNode(B),A)},adopt:function(){Array.flatten(arguments).each(function(A){this.appendChild($(A,true))},this);return this},dispose:function(){return this.parentNode.removeChild(this)},clone:function(E,D){switch($type(this)){case"element":var I={};for(var H=0,F=this.attributes.length;H<F;H++){var C=this.attributes[H],M=C.nodeName,L=C.nodeValue;if((M!="id"||D)&&L&&L!="inherit"&&["string","number"].contains($type(L))){I[M]=L}}var K=new Element(this.nodeName.toLowerCase(),I);if(E!==false){var B=[];for(var J=0,G=this.childNodes.length;J<G;J++){var A=Element.clone(this.childNodes[J],true,D);if(A){B.push(A)}}K.adopt(B)}return K;case"textnode":return document.newTextNode(this.nodeValue)}return null},replaces:function(A){A=$(A,true);A.parentNode.replaceChild(this,A);return this},hasClass:function(A){return this.className.contains(A," ")},addClass:function(A){if(!this.hasClass(A)){this.className=(this.className+" "+A).clean()}return this},removeClass:function(A){this.className=this.className.replace(new RegExp("(^|\\s)"+A+"(?:\\s|$)"),"$1").clean();return this},toggleClass:function(A){return this.hasClass(A)?this.removeClass(A):this.addClass(A)},getComputedStyle:function(C){var A=null;if(this.currentStyle){A=this.currentStyle[C.camelCase()]}else{var B=this.getWindow().getComputedStyle(this,null);if(B){A=B.getPropertyValue([C.hyphenate()])}}return A},empty:function(){var A=$A(this.getElementsByTagName("*"));A.each(function(B){$try(Element.prototype.dispose,B)});Garbage.trash(A);$try(Element.prototype.set,this,["html",""]);return this},destroy:function(){Garbage.kill(this.empty().dispose());return null},toQueryString:function(){var A=[];this.getElements("input, select, textarea",true).each(function(D){var B=D.name,C=D.type,E=Element.get(D,"value");if(E===false||!B||D.disabled){return }$splat(E).each(function(F){A.push(B+"="+encodeURIComponent(F))})});return A.join("&")},getProperty:function(C){var B=Element.Attributes,A=B.Props[C];var D=(A)?this[A]:this.getAttribute(C);return(B.Bools[C])?!!D:D},getProperties:function(){var A=$A(arguments);return A.map(function(B){return this.getProperty(B)},this).associate(A)},setProperty:function(D,E){var C=Element.Attributes,B=C.Props[D],A=$defined(E);if(B&&C.Bools[D]){E=(E||!A)?true:false}else{if(!A){return this.removeProperty(D)}}(B)?this[B]=E:this.setAttribute(D,E);return this},setProperties:function(A){for(var B in A){this.setProperty(B,A[B])}return this},removeProperty:function(D){var C=Element.Attributes,B=C.Props[D],A=(B&&C.Bools[D]);(B)?this[B]=(A)?false:"":this.removeAttribute(D);return this},removeProperties:function(){Array.each(arguments,this.removeProperty,this);return this}});
(function(){
	var A=function(D,B,I,C,F,H){var E=D[I||B];var G=[];while(E){if(E.nodeType==1&&(!C||Element.match(E,C))){G.push(E);if(!F){break}}E=E[B]}return(F)?new Elements(G,{ddup:false,cash:!H}):$(G[0],H)};Element.implement({getPrevious:function(B,C){return A(this,"previousSibling",null,B,false,C)},getAllPrevious:function(B,C){return A(this,"previousSibling",null,B,true,C)},getNext:function(B,C){return A(this,"nextSibling",null,B,false,C)},getAllNext:function(B,C){return A(this,"nextSibling",null,B,true,C)},getFirst:function(B,C){return A(this,"nextSibling","firstChild",B,false,C)},getLast:function(B,C){return A(this,"previousSibling","lastChild",B,false,C)},getParent:function(B,C){return A(this,"parentNode",null,B,false,C)},getParents:function(B,C){return A(this,"parentNode",null,B,true,C)},getChildren:function(B,C){return A(this,"nextSibling","firstChild",B,true,C)},hasChild:function(B){B=$(B,true);return(B&&$A(this.getElementsByTagName(B.tagName)).contains(B))}})})();
Element.alias("dispose","remove").alias("getLast","getLastChild");
Element.Properties=new Hash;
Element.Properties.style={set:function(A){this.style.cssText=A},get:function(){return this.style.cssText},erase:function(){this.style.cssText=""}};
Element.Properties.value={
	get:function(){switch(Element.get(this,"tag")){case"select":var A=[];Array.each(this.options,function(B){if(B.selected){A.push(B.value)}});return(this.multiple)?A:A[0];case"input":if(["checkbox","radio"].contains(this.type)&&!this.checked){return false}default:return $pick(this.value,false)}}};
Element.Properties.tag={get:function(){return this.tagName.toLowerCase()}};
Element.Properties.html={set:function(){return this.innerHTML=Array.flatten(arguments).join("")}};
Element.implement({
	getText:function(){return this.get("text")},setText:function(A){return this.set("text",A)},setHTML:function(){return this.set("html",arguments)},getHTML:function(){return this.get("html")},getTag:function(){return this.get("tag")}});
Native.implement(
	[Element,Window,Document],{addListener:function(B,A){if(this.addEventListener){this.addEventListener(B,A,false)}else{this.attachEvent("on"+B,A)}return this},removeListener:function(B,A){if(this.removeEventListener){this.removeEventListener(B,A,false)}else{this.detachEvent("on"+B,A)}return this},retrieve:function(B,A){var D=Element.Storage.get(this.uid);var C=D[B];if($defined(A)&&!$defined(C)){C=D[B]=A}return $pick(C)},store:function(B,A){var C=Element.Storage.get(this.uid);C[B]=A;return this},eliminate:function(A){var B=Element.Storage.get(this.uid);delete B[A];return this}});
Element.Attributes=new Hash({
	Props:{html:"innerHTML","class":"className","for":"htmlFor",text:(Browser.Engine.trident||Browser.Engine.webkit)?"innerText":"textContent"},Bools:["compact","nowrap","ismap","declare","noshade","checked","disabled","readonly","multiple","selected","noresize","defer"],Camels:["value","accessKey","cellPadding","cellSpacing","colSpan","frameBorder","maxLength","readOnly","rowSpan","tabIndex","useMap"]});
(function(B){var C=B.Bools,A=B.Camels;B.Bools=C=C.associate(C);Hash.extend(Hash.merge(B.Props,C),A.associate(A.map(function(D){return D.toLowerCase()})));B.remove("Camels")})(Element.Attributes);
var Garbage={
	Elements:{},ignored:{object:1,embed:1,OBJECT:1,EMBED:1},collect:function(A){if(A.$attributes){return true}if(Garbage.ignored[A.tagName]){return false}Garbage.Elements[A.uid]=A;A.$attributes={};return true},trash:function(C){for(var A=C.length,B;A--;A){Garbage.kill(C[A])}},kill:function(A){if(!A||!A.$attributes){return }delete Garbage.Elements[A.uid];if(A.retrieve("events")){A.removeEvents()}for(var B in A.$attributes){A.$attributes[B]=null}if(Browser.Engine.trident){for(var C in Element.Prototype){A[C]=null}}A.$attributes=A.uid=null},empty:function(){for(var A in Garbage.Elements){Garbage.kill(Garbage.Elements[A])}}};
window.addListener(
	"beforeunload",function(){window.addListener("unload",Garbage.empty);if(Browser.Engine.trident){window.addListener("unload",CollectGarbage)}});
Element.Properties.events={set:function(A){this.addEvents(A)}};
Native.implement(
	[Element,Window,Document],{addEvent:function(E,G){var H=this.retrieve("events",{});H[E]=H[E]||{keys:[],values:[]};if(H[E].keys.contains(G)){return this}H[E].keys.push(G);var F=E,A=Element.Events.get(E),C=G,I=this;if(A){if(A.onAdd){A.onAdd.call(this,G)}if(A.condition){C=function(J){if(A.condition.call(this,J)){return G.call(this,J)}return false}}F=A.base||F}var D=function(){return G.call(I)};var B=Element.NativeEvents[F]||0;if(B){if(B==2){D=function(J){J=new Event(J,I.getWindow());if(C.call(I,J)===false){J.stop()}}}this.addListener(F,D)}H[E].values.push(D);return this},removeEvent:function(D,C){var B=this.retrieve("events");if(!B||!B[D]){return this}var G=B[D].keys.indexOf(C);if(G==-1){return this}var A=B[D].keys.splice(G,1)[0];var F=B[D].values.splice(G,1)[0];var E=Element.Events.get(D);if(E){if(E.onRemove){E.onRemove.call(this,C)}D=E.base||D}return(Element.NativeEvents[D])?this.removeListener(D,F):this},addEvents:function(A){for(var B in A){this.addEvent(B,A[B])}return this},removeEvents:function(B){var A=this.retrieve("events");if(!A){return this}if(!B){for(var C in A){this.removeEvents(C)}A=null}else{if(A[B]){while(A[B].keys[0]){this.removeEvent(B,A[B].keys[0])}A[B]=null}}return this},fireEvent:function(D,B,A){var C=this.retrieve("events");if(!C||!C[D]){return this}C[D].keys.each(function(E){E.create({bind:this,delay:A,"arguments":B})()},this);return this},cloneEvents:function(D,A){D=$(D);var C=D.retrieve("events");if(!C){return this}if(!A){for(var B in C){this.cloneEvents(D,B)}}else{if(C[A]){C[A].keys.each(function(E){this.addEvent(A,E)},this)}}return this}});
Element.NativeEvents={
	click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,DOMMouseScroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,load:1,unload:1,beforeunload:1,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1};
(function(){
	var A=function(B){var C=B.relatedTarget;if(!C){return true}return($type(this)!="document"&&C!=this&&C.prefix!="xul"&&!this.hasChild(C))};Element.Events=new Hash({mouseenter:{base:"mouseover",condition:A},mouseleave:{base:"mouseout",condition:A},mousewheel:{base:(Browser.Engine.gecko)?"DOMMouseScroll":"mousewheel"}})})();
Element.Properties.styles={set:function(A){this.setStyles(A)}};
Element.Properties.opacity={
	set:function(A,B){if(!B){if(A==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden"}}else{if(this.style.visibility!="visible"){this.style.visibility="visible"}}}if(!this.currentStyle||!this.currentStyle.hasLayout){this.style.zoom=1}if(Browser.Engine.trident){this.style.filter=(A==1)?"":"alpha(opacity="+A*100+")"}this.style.opacity=A;this.store("opacity",A)},get:function(){return this.retrieve("opacity",1)}};
Element.implement({
	setOpacity:function(A){return this.set("opacity",A,true)},getOpacity:function(){return this.get("opacity")},setStyle:function(B,A){switch(B){case"opacity":return this.set("opacity",parseFloat(A));case"float":B=(Browser.Engine.trident)?"styleFloat":"cssFloat"}B=B.camelCase();if($type(A)!="string"){var C=(Element.Styles.get(B)||"@").split(" ");A=$splat(A).map(function(E,D){if(!C[D]){return""}return($type(E)=="number")?C[D].replace("@",Math.round(E)):E}).join(" ")}else{if(A==String(Number(A))){A=Math.round(A)}}this.style[B]=A;return this},getStyle:function(G){switch(G){case"opacity":return this.get("opacity");case"float":G=(Browser.Engine.trident)?"styleFloat":"cssFloat"}G=G.camelCase();var A=this.style[G];if(!$chk(A)){A=[];for(var F in Element.ShortStyles){if(G!=F){continue}for(var E in Element.ShortStyles[F]){A.push(this.getStyle(E))}return A.join(" ")}A=this.getComputedStyle(G)}if(A){A=String(A);var C=A.match(/rgba?\([\d\s,]+\)/);if(C){A=A.replace(C[0],C[0].rgbToHex())}}if(Browser.Engine.presto||(Browser.Engine.trident&&!$chk(parseInt(A)))){if(G.test(/^(height|width)$/)){var B=(G=="width")?["left","right"]:["top","bottom"],D=0;B.each(function(H){D+=this.getStyle("border-"+H+"-width").toInt()+this.getStyle("padding-"+H).toInt()},this);return this["offset"+G.capitalize()]-D+"px"}if(Browser.Engine.presto&&String(A).test("px")){return A}if(G.test(/(border(.+)Width|margin|padding)/)){return"0px"}}return A},setStyles:function(B){for(var A in B){this.setStyle(A,B[A])}return this},getStyles:function(){var A={};Array.each(arguments,function(B){A[B]=this.getStyle(B)},this);return A}});
Element.Styles=new Hash({
	width:"@px",height:"@px",left:"@px",top:"@px",bottom:"@px",right:"@px",maxWidth:"@px",maxHeight:"@px",backgroundColor:"rgb(@, @, @)",backgroundPosition:"@px @px",color:"rgb(@, @, @)",fontSize:"@px",letterSpacing:"@px",lineHeight:"@px",clip:"rect(@px @px @px @px)",margin:"@px @px @px @px",padding:"@px @px @px @px",border:"@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)",borderWidth:"@px @px @px @px",borderStyle:"@ @ @ @",borderColor:"rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)",zIndex:"@",zoom:"@",fontWeight:"@",textIndent:"@px",opacity:"@"});
Element.ShortStyles={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};
["Top","Right","Bottom","Left"].each(function(G){
	var F=Element.ShortStyles;var B=Element.Styles;["margin","padding"].each(function(H){var I=H+G;F[H][I]=B[I]="@px"});var E="border"+G;F.border[E]=B[E]="@px @ rgb(@, @, @)";var D=E+"Width",A=E+"Style",C=E+"Color";F[E]={};F.borderWidth[D]=F[E][D]=B[D]="@px";F.borderStyle[A]=F[E][A]=B[A]="@";F.borderColor[C]=F[E][C]=B[C]="rgb(@, @, @)"});
(function(){
	function A(B){return B.tagName.toLowerCase()=="body"}Element.implement({positioned:function(){if(A(this)){return true}return(Element.getComputedStyle(this,"position")!="static")},getOffsetParent:function(){if(A(this)){return null}if(!Browser.Engine.trident){return $(this.offsetParent)}var B=this;while((B=B.parentNode)){if(Element.positioned(B)){return $(B)}}return null},getSize:function(){if(A(this)){return this.getWindow().getSize()}return{x:this.offsetWidth,y:this.offsetHeight}},getScrollSize:function(){if(A(this)){return this.getWindow().getScrollSize()}return{x:this.scrollWidth,y:this.scrollHeight}},getScroll:function(){if(A(this)){return this.getWindow().getScroll()}return{x:this.scrollLeft,y:this.scrollTop}},scrollTo:function(B,C){if(A(this)){return this.getWindow().scrollTo(B,C)}this.scrollLeft=B;this.scrollTop=C;return this},getPosition:function(D){if(A(this)){return{x:0,y:0}}var C=this,B={x:0,y:0};while(C){B.x+=C.offsetLeft;B.y+=C.offsetTop;C=C.offsetParent}var E=(D)?$(D).getPosition():{x:0,y:0};return{x:B.x-E.x,y:B.y-E.y}},getCoordinates:function(D){if(A(this)){return this.getWindow().getCoordinates()}var B=this.getPosition(D),C=this.getSize();var E={top:B.y,left:B.x,width:C.x,height:C.y};E.right=E.left+E.width;E.bottom=E.top+E.height;return E},getRelativePosition:function(){return this.getPosition(this.getOffsetParent())},computePosition:function(B){return{left:B.x-(this.getComputedStyle("margin-left").toInt()||0),top:B.y-(this.getComputedStyle("margin-top").toInt()||0)}},position:function(B){return this.setStyles(this.computePosition(B))}})})();
Native.implement(
	[Window,Document],{getSize:function(){var C=this.getDocument(),B=this.getWindow(),A=C.documentElement;if(Browser.Engine.webkit419){return{x:B.innerWidth,y:B.innerHeight}}if(Browser.Engine.presto925){return{x:C.body.clientWidth,y:C.body.clientHeight}}return{x:A.clientWidth,y:A.clientHeight}},getScroll:function(){var B=this.getWindow(),A=this.getDocument().documentElement;return{x:$pick(B.pageXOffset,A.scrollLeft),y:$pick(B.pageYOffset,A.scrollTop)}},getScrollSize:function(){var C=this.getDocument(),B=C.documentElement,A=C.body;if(Browser.Engine.trident){return{x:Math.max(B.clientWidth,B.scrollWidth),y:Math.max(B.clientHeight,B.scrollHeight)}}if(Browser.Engine.webkit){return{x:A.scrollWidth,y:A.scrollHeight}}return{x:B.scrollWidth,y:B.scrollHeight}},getPosition:function(){return{x:0,y:0}},getCoordinates:function(){var A=this.getSize();return{top:0,left:0,height:A.y,width:A.x,bottom:A.y,right:A.x}}});
Native.implement(
	[Window,Document,Element],{getHeight:function(){return this.getSize().y},getWidth:function(){return this.getSize().x},getScrollTop:function(){return this.getScroll().y},getScrollLeft:function(){return this.getScroll().x},getScrollHeight:function(){return this.getScrollSize().y},getScrollWidth:function(){return this.getScrollSize().x},getTop:function(){return this.getPosition().y},getLeft:function(){return this.getPosition().x}});
Native.implement(
	[Element,Document],{getElements:function(N,M){var J={};N=N.split(",");var A=[],H=N.length;var B=(H>1);for(var I=0;I<H;I++){var E=N[I],K=[],G=[];E=E.trim().replace(Selectors.sRegExp,function(P){if(P.charAt(2)){P=P.trim()}G.push(P.charAt(0));return":)"+P.charAt(1)}).split(":)");for(var F=0,D=E.length;F<D;F++){var C=Selectors.parse(E[F]);if(!C){return[]}var O=Selectors.Method.getParam(K,G[F-1]||false,this,C,J);if(!O){break}K=O}var L=Selectors.Method.getItems(K,this);A=(B)?A.concat(L):L}return new Elements(A,{ddup:B,cash:!M})}});
Window.implement({$E:function(A){return this.document.getElement(A)}});
var Selectors={
	regExp:(/:([^-:(]+)[^:(]*(?:\((["']?)(.*?)\2\))?|\[(\w+)(?:([!*^$~|]?=)(["']?)(.*?)\6)?\]|\.[\w-]+|#[\w-]+|\w+|\*/g),
	sRegExp:(/\s*([+>~\s])[a-zA-Z#.*\s]/g)
};
Selectors.parse=function(A){
	var B={tag:"*",id:null,classes:[],attributes:[],pseudos:[]};A=A.replace(Selectors.regExp,function(E){switch(E.charAt(0)){case".":B.classes.push(E.slice(1));break;case"#":B.id=E.slice(1);break;case"[":B.attributes.push([arguments[4],arguments[5],arguments[7]]);break;case":":var D=Selectors.Pseudo.get(arguments[1]);if(!D){B.attributes.push([arguments[1],arguments[3]?"=":"",arguments[3]]);break}var C={name:arguments[1],parser:D,argument:(D.parser)?D.parser(arguments[3]):arguments[3]};B.pseudos.push(C);break;default:B.tag=E}return""});return B};
Selectors.Pseudo=new Hash;
Selectors.XPath={
	getParam:function(B,G,D,H){
		var A="";switch(G){case" ":A+="//";break;case">":A+="/";break;case"+":A+="/following-sibling::*[1]/self::";break;case"~":A+="/following-sibling::";break}A+=(D.namespaceURI)?"xhtml:"+H.tag:H.tag;var C;for(C=H.pseudos.length;C--;C){var F=H.pseudos[C];if(F.parser&&F.parser.xpath){A+=F.parser.xpath(F.argument)}else{A+=($chk(F.argument))?"[@"+F.name+'="'+F.argument+'"]':"[@"+F.name+"]"}}if(H.id){A+='[@id="'+H.id+'"]'}for(C=H.classes.length;C--;C){A+='[contains(concat(" ", @class, " "), " '+H.classes[C]+' ")]'}for(C=H.attributes.length;C--;C){var E=H.attributes[C];switch(E[1]){case"=":A+="[@"+E[0]+'="'+E[2]+'"]';break;case"*=":A+="[contains(@"+E[0]+', "'+E[2]+'")]';break;case"^=":A+="[starts-with(@"+E[0]+', "'+E[2]+'")]';break;case"$=":A+="[substring(@"+E[0]+", string-length(@"+E[0]+") - "+E[2].length+' + 1) = "'+E[2]+'"]';break;case"!=":A+="[@"+E[0]+'!="'+E[2]+'"]';break;case"~=":A+='[contains(concat(" ", @'+E[0]+', " "), " '+E[2]+' ")]';break;case"|=":A+='[contains(concat("-", @'+E[0]+', "-"), "-'+E[2]+'-")]';break;default:A+="[@"+E[0]+"]"}}B.push(A);return B},
	getItems:function(B,E){
		var F=[];var G=E.getDocument();var A=G.evaluate(".//"+B.join(""),E,Selectors.XPath.resolver,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);for(var D=0,C=A.snapshotLength;D<C;D++){F[D]=A.snapshotItem(D)}return F},
	resolver:function(A){return(A=="xhtml")?"http://www.w3.org/1999/xhtml":false}};
Selectors.Filter={
	getParam:function(H,B,A,P,Q){var F=[];var R=P.tag;if(B){var C={},E,D,O,L,K;var G=function(S){S.uid=S.uid||[Native.UID++];if(!C[S.uid]&&Selectors.Filter.match(S,P,Q)){C[S.uid]=true;F.push(S);return true}return false};for(var N=0,M=H.length;N<M;N++){O=H[N];switch(B){case" ":D=O.getElementsByTagName(R);P.tag=false;for(L=0,K=D.length;L<K;L++){G(D[L])}break;case">":D=O.childNodes;for(L=0,K=D.length;L<K;L++){if(D[L].nodeType==1){G(D[L])}}break;case"+":while((O=O.nextSibling)){if(O.nodeType==1){G(O);break}}break;case"~":while((O=O.nextSibling)){if(O.nodeType==1&&G(O)){break}}break}}return F}if(P.id){el=A.getElementById(P.id,true);P.id=false;return(el&&Selectors.Filter.match(el,P,Q))?[el]:false}else{H=A.getElementsByTagName(R);P.tag=false;for(var J=0,I=H.length;J<I;J++){if(Selectors.Filter.match(H[J],P,Q)){F.push(H[J])}}}return F},getItems:$arguments(0)};
Selectors.Filter.match=function(C,E,G){
	G=G||{};if(E.id&&E.id!=C.id){return false}if(E.tag&&E.tag!="*"&&E.tag!=C.tagName.toLowerCase()){return false}var B;for(B=E.classes.length;B--;B){if(!C.className||!C.className.contains(E.classes[B]," ")){return false}}for(B=E.attributes.length;B--;B){var D=E.attributes[B];var A=Element.prototype.getProperty.call(C,D[0]);if(!A){return false}if(!D[1]){continue}var F;switch(D[1]){case"=":F=(A==D[2]);break;case"*=":F=(A.contains(D[2]));break;case"^=":F=(A.substr(0,D[2].length)==D[2]);break;case"$=":F=(A.substr(A.length-D[2].length)==D[2]);break;case"!=":F=(A!=D[2]);break;case"~=":F=A.contains(D[2]," ");break;case"|=":F=A.contains(D[2],"-")}if(!F){return false}}for(B=E.pseudos.length;B--;B){if(!E.pseudos[B].parser.filter.call(C,E.pseudos[B].argument,G)){return false}}return true};
Selectors.Method=(Browser.Features.xpath)?Selectors.XPath:Selectors.Filter;
Element.implement({match:function(A){return(!A||Selectors.Filter.match(this,Selectors.parse(A)))}});
Element.Events.domready={onAdd:function(A){if(Browser.loaded){A.call(this)}}};
(function(){
	var A=function(){if(Browser.loaded){return }Browser.loaded=true;window.fireEvent("domready");document.fireEvent("domready")};switch(Browser.Engine.name){case"webkit":(function(){(["loaded","complete"].contains(document.readyState))?A():arguments.callee.delay(50)})();break;case"trident":(function(){var B=document.createElement("div");try{B.doScroll("left")}catch(C){arguments.callee.delay(50);return }A()})();break;default:window.addEvent("load",A);document.addEvent("DOMContentLoaded",A)}})();
var JSON=new Hash(
	{encode:function(B){
				switch($type(B)){
				case"string":return'"'+B.replace(/[\x00-\x1f\\"]/g,JSON.$replaceChars)+'"';
				case"array":return"["+String(B.map(JSON.encode).filter($defined))+"]";
				case"object":
				case"hash":var A=[];Hash.each(B,function(E,D){var C=JSON.encode(E);if(C){A.push(JSON.encode(D)+":"+C)}});return"{"+String(A)+"}";
				case"number":
				case"boolean":return String(B);
				case false:return"null"}return null
			},
	$specialChars:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},
	$replaceChars:function(A){
				return JSON.$specialChars[A]||"\\u00"+Math.floor(A.charCodeAt()/16).toString(16)+(A.charCodeAt()%16).toString(16)
			},
	decode:function(string,secure){
					if($type(string)!="string"||!string.length){
						return null
					}
					if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,
					"")))
					{
						return null
						
					}
				return eval("("+string+")")
				
				}
	}
);
Native.implement([Hash,Array,String,Number],{toJSON:function(){return JSON.encode(this)}});
var Cookie=new Class({
	Implements:Options,
	options:{path:false,domain:false,duration:false,secure:false,document:document},
	initialize:function(B,A){this.key=B;this.setOptions(A)},
	write:function(B){
		B=encodeURIComponent(B);
		if(this.options.domain){B+="; domain="+this.options.domain}
		if(this.options.path){B+="; path="+this.options.path}
		if(this.options.duration){
			var A=new Date();
			A.setTime(A.getTime()+this.options.duration*24*60*60*1000);
			B+="; expires="+A.toGMTString()
		}
		if(this.options.secure){B+="; secure"}
		this.options.document.cookie=this.key+"="+B;
		return this
	},
	read:function(){
		var A=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)");
		return A?decodeURIComponent(A[1]):null
	},
	erase:function(){new Cookie(this.key,$merge(this.options,{duration:-1})).write("");return this}
});
Cookie.set=function(B,C,A){return new Cookie(B,A).write(C)};
Cookie.get=function(A){return new Cookie(A).read()};
Cookie.remove=function(B,A){return new Cookie(B,A).erase()};
var Color=new Native({
	initialize:function(B,C){
		if(arguments.length>=3){
			C="rgb";B=Array.slice(arguments,0,3)
		}else{
			if(typeof B=="string"){
				if(B.match(/rgb/)){
					B=B.rgbToHex().hexToRgb(true)
				}else{
					if(B.match(/hsb/)){B=B.hsbToRgb()}else{B=B.hexToRgb(true)}
				}
			}
		}
		C=C||"rgb";
		switch(C){
			case"hsb":var A=B;B=B.hsbToRgb();B.hsb=A;break;
			case"hex":B=B.hexToRgb(true);break
		}
		B.rgb=B.slice(0,3);
		B.hsb=B.hsb||B.rgbToHsb();
		B.hex=B.rgbToHex();
		return $extend(B,this)
	}
});
Color.implement({
	mix:function(){
		var A=Array.slice(arguments);
		var C=($type(A.getLast())=="number")?A.pop():50;
		var B=this.slice();
		A.each(function(D){D=new Color(D);for(var E=0;E<3;E++){B[E]=Math.round((B[E]/100*(100-C))+(D[E]/100*C))}});
		return new Color(B,"rgb")
	},
	invert:function(){return new Color(this.map(function(A){return 255-A}))},
	setHue:function(A){return new Color([A,this.hsb[1],this.hsb[2]],"hsb")},
	setSaturation:function(A){return new Color([this.hsb[0],A,this.hsb[2]],"hsb")},
	setBrightness:function(A){return new Color([this.hsb[0],this.hsb[1],A],"hsb")}
});
function $RGB(C,B,A){return new Color([C,B,A],"rgb")}
function $HSB(C,B,A){return new Color([C,B,A],"hsb")}
function $HEX(A){return new Color(A,"hex")}
Array.implement({
	rgbToHsb:function(){
		var B=this[0],C=this[1],J=this[2];
		var G,F,H;
		var I=Math.max(B,C,J),E=Math.min(B,C,J);
		var K=I-E;H=I/255;F=(I!=0)?K/I:0;
		if(F==0){
			G=0
		}else{
			var D=(I-B)/K;
			var A=(I-C)/K;
			var L=(I-J)/K;
			if(B==I){G=L-A}else{if(C==I){G=2+D-L}else{G=4+A-D}}
			G/=6;
			if(G<0){G++}
		}
		return[Math.round(G*360),Math.round(F*100),Math.round(H*100)]
	},
	hsbToRgb:function(){
		var C=Math.round(this[2]/100*255);
		if(this[1]==0){
			return[C,C,C]
		}else{
			var A=this[0]%360;
			var E=A%60;
			var F=Math.round((this[2]*(100-this[1]))/10000*255);
			var D=Math.round((this[2]*(6000-this[1]*E))/600000*255);
			var B=Math.round((this[2]*(6000-this[1]*(60-E)))/600000*255);
			switch(Math.floor(A/60)){
				case 0:return[C,B,F];
				case 1:return[D,C,F];
				case 2:return[F,C,B];
				case 3:return[F,D,C];
				case 4:return[B,F,C];
				case 5:return[C,F,D]
			}
		}
		return false}
});
String.implement({
	rgbToHsb:function(){var A=this.match(/\d{1,3}/g);return(A)?hsb.rgbToHsb():null},
	hsbToRgb:function(){var A=this.match(/\d{1,3}/g);return(A)?A.hsbToRgb():null}});
var Fx=new Class({
	Implements:[Chain,Events,Options],
	options:{fps:50,unit:false,duration:500,link:"ignore",transition:function(A){return -(Math.cos(Math.PI*A)-1)/2}},
	initialize:function(A){
		this.pass=this.pass||this;
		this.setOptions(A);
		this.options.duration=Fx.Durations[this.options.duration]||this.options.duration.toInt();
		var B=this.options.wait;
		if(B===false){this.options.link="cancel"}
	},
	step:function(){
		var A=$time();
		if(A<this.time+this.options.duration){
			var B=this.options.transition((A-this.time)/this.options.duration);
			this.set(this.compute(this.from,this.to,B))
		}else{this.set(this.compute(this.from,this.to,1));this.complete()}
	},
	set:function(A){return A},
	compute:function(C,B,A){return Fx.compute(C,B,A)},
	check:function(){
		if(!this.timer){return true}
		switch(this.options.link){
			case"cancel":this.cancel();return true;
			case"chain":this.chain(this.start.bind(this,arguments));
			return false
		}
		return false
	},
	start:function(B,A){
		if(!this.check(B,A)){return this}
		this.from=B;
		this.to=A;
		this.time=0;
		this.startTimer();
		this.onStart();
		return this
	},
	complete:function(){return(!this.stopTimer())?this:this.onComplete()},
	cancel:function(){return(!this.stopTimer())?this:this.onCancel()},
	onStart:function(){return this.fireEvent("onStart",this.pass)},
	onComplete:function(){return this.fireEvent("onComplete",this.pass).callChain()},
	onCancel:function(){return this.fireEvent("onCancel",this.pass).clearChain()},
	pause:function(){this.stopTimer();return this},
	resume:function(){this.startTimer();return this},
	stopTimer:function(){if(!this.timer){return false}this.time=$time()-this.time;this.timer=$clear(this.timer);return true},
	startTimer:function(){
		if(this.timer){
			return false
		}
		this.time=$time()-this.time;
		this.timer=this.step.periodical(Math.round(1000/this.options.fps),this);
		return true
	}
});
Fx.compute=function(C,B,A){return(B-C)*A+C};
Fx.Durations={"short":250,normal:500,"long":1000};
Fx.CSS=new Class({
	Extends:Fx,prepare:function(D,E,B){B=$splat(B);var C=B[1];if(!$chk(C)){B[1]=B[0];B[0]=D.getStyle(E)}var A=B.map(this.parse);return{from:A[0],to:A[1]}},parse:function(A){A=$lambda(A)();A=(typeof A=="string")?A.split(" "):$splat(A);return A.map(function(C){C=String(C);var B=false;Fx.CSS.Parsers.each(function(F,E){if(B){return }var D=F.parse(C);if($chk(D)){B={value:D,parser:F}}});B=B||{value:C,parser:Fx.CSS.Parsers.String};return B})},compute:function(D,C,B){var A=[];(Math.min(D.length,C.length)).times(function(E){A.push({value:D[E].parser.compute(D[E].value,C[E].value,B),parser:D[E].parser})});A.$family={name:"fx:css:value"};return A},serve:function(C,B){if($type(C)!="fx:css:value"){C=this.parse(C)}var A=[];C.each(function(D){A=A.concat(D.parser.serve(D.value,B))});return A},render:function(A,C,B){A.setStyle(C,this.serve(B,this.options.unit))},search:function(A){var B={};Array.each(document.styleSheets,function(D,C){var E=D.rules||D.cssRules;Array.each(E,function(G,F){if(!G.style||!G.selectorText||!G.selectorText.test("^"+A+"$")){return }Element.Styles.each(function(I,H){if(!G.style[H]||Element.ShortStyles[H]){return }I=String(G.style[H]);B[H]=(I.test(/^rgb/))?I.rgbToHex():I})})});return B}});
Fx.CSS.Parsers=new Hash({
	Color:{parse:function(A){if(A.match(/^#[0-9a-f]{3,6}$/i)){return A.hexToRgb(true)}return((A=A.match(/(\d+),\s*(\d+),\s*(\d+)/)))?[A[1],A[2],A[3]]:false},compute:function(C,B,A){return C.map(function(E,D){return Math.round(Fx.compute(C[D],B[D],A))})},serve:function(A){return A.map(Number)}},Number:{parse:function(A){return parseFloat(A)},compute:function(C,B,A){return Fx.compute(C,B,A)},serve:function(B,A){return(A)?B+A:B}},String:{parse:$lambda(false),compute:$arguments(1),serve:$arguments(0)}});
Fx.Tween=new Class({
	Extends:Fx.CSS,initialize:function(B,C,A){this.element=this.pass=$(B);this.property=C;arguments.callee.parent(A)},set:function(A){this.render(this.element,this.property,A);return this},start:function(){var A=Array.slice(arguments);if(!this.check(A)){return this}var B=this.prepare(this.element,this.property,A);return arguments.callee.parent(B.from,B.to)}});

Element.Properties.tween={
	set:function(A){var B=this.retrieve("tween");if(B){B.cancel()}return this.store("tween",new Fx.Tween(this,null,$extend({link:"cancel"},A)))},get:function(C,A){if(A||!this.retrieve("tween")){this.set("tween",A)}var B=this.retrieve("tween");B.property=C;return B}};
Element.implement({
	tween:function(B){var A=this.get("tween",B);A.start.apply(A,Array.slice(arguments,1));return this},fade:function(A){var B=this.get("tween","opacity");A=$pick(A,"toggle");switch(A){case"in":B.start(1);break;case"out":B.start(0);break;case"show":B.set(1);break;case"hide":B.set(0);break;case"toggle":B.start((function(){return(this.getStyle("visibility")=="hidden")?1:0}).bind(this));break;default:B.start.apply(B,arguments)}return this},highlight:function(C,A){if(!A){var B=this.getStyle("background-color");A=(B=="transparent")?"#ffffff":B}this.get("tween","background-color").start(C||"#ffff88",A);return this},effect:function(B,A){return new Fx.Tween(this,B,A)}});

Fx.Morph=new Class({
	Extends:Fx.CSS,initialize:function(B,A){this.element=this.pass=$(B);arguments.callee.parent(A)},set:function(A){if(typeof A=="string"){A=this.search(A)}for(var B in A){this.render(this.element,B,A[B])}return this},compute:function(E,D,C){var A={};for(var B in E){A[B]=arguments.callee.parent(E[B],D[B],C)}return A},start:function(B){if(!this.check(B)){return this}if(typeof B=="string"){B=this.search(B)}var E={},D={};for(var C in B){var A=this.prepare(this.element,C,B[C]);E[C]=A.from;D[C]=A.to}return arguments.callee.parent(E,D)}});

Element.Properties.morph={
	set:function(A){var B=this.retrieve("morph");if(B){B.cancel()}return this.store("morph",new Fx.Morph(this,$extend({link:"cancel"},A)))},get:function(A){if(A||!this.retrieve("morph")){this.set("morph",A)}return this.retrieve("morph")}};

Element.implement({morph:function(A){this.get("morph").start(A);return this},effects:function(A){return new Fx.Morph(this,A)}});

Fx.Slide=new Class({
	Extends:Fx,options:{mode:"vertical"},initialize:function(B,A){this.addEvent("onComplete",function(){this.open=(this.wrapper["offset"+this.layout.capitalize()]!=0);if(this.open&&Browser.Engine.webkit419){this.element.dispose().inject(this.wrapper)}},true);this.element=this.subject=$(B);arguments.callee.parent(A);var C=this.element.retrieve("wrapper");this.wrapper=C||new Element("div",{styles:$extend(this.element.getStyles("margin","position"),{overflow:"hidden"})}).wraps(this.element);this.element.store("wrapper",this.wrapper).setStyle("margin",0);this.now=[];this.open=true},vertical:function(){this.margin="margin-top";this.layout="height";this.offset=this.element.offsetHeight},horizontal:function(){this.margin="margin-left";this.layout="width";this.offset=this.element.offsetWidth},set:function(A){this.element.setStyle(this.margin,A[0]);this.wrapper.setStyle(this.layout,A[1]);return this},compute:function(D,C,B){var A=[];(2).times(function(E){A[E]=Fx.compute(D[E],C[E],B)});return A},start:function(B,E){if(!this.check(B,E)){return this}this[E||this.options.mode]();var D=this.element.getStyle(this.margin).toInt();var C=this.wrapper.getStyle(this.layout).toInt();var A=[[D,C],[0,this.offset]];var G=[[D,C],[-this.offset,0]];var F;switch(B){case"in":F=A;break;case"out":F=G;break;case"toggle":F=(this.wrapper["offset"+this.layout.capitalize()]==0)?A:G}return arguments.callee.parent(F[0],F[1])},slideIn:function(A){return this.start("in",A)},slideOut:function(A){return this.start("out",A)},hide:function(A){this[A||this.options.mode]();this.open=false;return this.set([-this.offset,0])},show:function(A){this[A||this.options.mode]();this.open=true;return this.set([0,this.offset])},toggle:function(A){return this.start("toggle",A)}
});

Element.Properties.slide={set:function(B){var A=this.retrieve("slide");if(A){A.cancel()}return this.store("slide",new Fx.Slide(this,$extend({link:"cancel"},B)))},get:function(A){if(A||!this.retrieve("slide")){this.set("slide",A)}return this.retrieve("slide")}};

Element.implement({
	slide:function(B){
		B=B||"toggle";
		var A=this.get("slide");switch(B){case"hide":A.hide();break;case"show":A.show();break;default:A.start(B)}return this
	}
});

Fx.Scroll=new Class({
	Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(B,A){this.element=this.pass=$(B);arguments.callee.parent(A);var D=this.cancel.bind(this,false);if($type(this.element)!="element"){this.element=$(this.element.getDocument().body)}var C=this.element;if(this.options.wheelStops){this.addEvent("onStart",function(){C.addEvent("mousewheel",D)},true);this.addEvent("onComplete",function(){C.removeEvent("mousewheel",D)},true)}},set:function(){var A=Array.flatten(arguments);this.element.scrollTo(A[0],A[1])},compute:function(D,C,B){var A=[];(2).times(function(E){A.push(Fx.compute(D[E],C[E],B))});return A},start:function(C,H){if(!this.check(C,H)){return this}var E=this.element.getSize(),F=this.element.getScrollSize(),B=this.element.getScroll(),D={x:C,y:H};for(var G in D){var A=F[G]-E[G];if($chk(D[G])){D[G]=($type(D[G])=="number")?D[G].limit(0,A):A}else{D[G]=B[G]}D[G]+=this.options.offset[G]}return arguments.callee.parent([B.x,B.y],[D.x,D.y])},toTop:function(){return this.start(false,0)},toLeft:function(){return this.start(0,false)},toRight:function(){return this.start("right",false)},toBottom:function(){return this.start(false,"bottom")},toElement:function(B){var A=$(B).getPosition(this.element);return this.start(A.x,A.y)}
});

(function(){
	var A=Fx.prototype.initialize;
	Fx.prototype.initialize=function(B){
		A.call(this,B);
		var C=this.options.transition;
		if(typeof C=="string"&&(C=C.split(":"))){
			var D=Fx.Transitions;
			D=D[C[0]]||D[C[0].capitalize()];
			if(C[1]){D=D["ease"+C[1].capitalize()+(C[2]?C[2].capitalize():"")]}
			this.options.transition=D
		}
	}
})();

Fx.Transition=function(B,A){
	A=$splat(A);return $extend(B,{easeIn:function(C){return B(C,A)},easeOut:function(C){return 1-B(1-C,A)},easeInOut:function(C){return(C<=0.5)?B(2*C,A)/2:(2-B(2*(1-C),A))/2}})};
Fx.Transitions=new Hash({linear:$arguments(0)});
Fx.Transitions.extend=function(A){for(var B in A){Fx.Transitions[B]=new Fx.Transition(A[B])}};
Fx.Transitions.extend({
	Pow:function(B,A){return Math.pow(B,A[0]||6)},Expo:function(A){return Math.pow(2,8*(A-1))},Circ:function(A){return 1-Math.sin(Math.acos(A))},Sine:function(A){return 1-Math.sin((1-A)*Math.PI/2)},Back:function(B,A){A=A[0]||1.618;return Math.pow(B,2)*((A+1)*B-A)},Bounce:function(D){var C;for(var B=0,A=1;1;B+=A,A/=2){if(D>=(7-4*B)/11){C=-Math.pow((11-6*B-11*D)/4,2)+A*A;break}}return C},Elastic:function(B,A){return Math.pow(2,10*--B)*Math.cos(20*B*Math.PI*(A[0]||1)/3)}});
["Quad","Cubic","Quart","Quint"].each(function(B,A){Fx.Transitions[B]=new Fx.Transition(function(C){return Math.pow(C,[A+2])})});

var Request=new Class({
	Implements:[Chain,Events,Options],
	options:{
		url:"",data:"",
		headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},
		async:true,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",
		evalScripts:false,evalResponse:false},
	getXHR:function(){
		return(window.XMLHttpRequest)?new XMLHttpRequest():((window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):false)},
	initialize:function(A){
		if(!(this.xhr=this.getXHR())){return }
		this.setOptions(A);
		this.options.isSuccess=this.options.isSuccess||this.isSuccess;
		this.headers=new Hash(this.options.headers)
	},
	onStateChange:function(){
		if(this.xhr.readyState!=4||!this.running){return }
		this.running=false;this.status=0;
		$try(function(){this.status=this.xhr.status},this);
		if(this.options.isSuccess.call(this,this.status)){
			this.response={text:this.xhr.responseText,xml:this.xhr.responseXML};this.success(this.response.text,this.response.xml)
		}else{this.response={text:null,xml:null};this.failure()}this.xhr.onreadystatechange=$empty
	},
	isSuccess:function(){return((this.status>=200)&&(this.status<300))},
	processScripts:function(A){
		if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){
			return $exec(A)}return A.stripScripts(this.options.evalScripts)
	},
	success:function(B,A){this.onSuccess(this.processScripts(B),A)},
	onSuccess:function(){this.fireEvent("onComplete",arguments).fireEvent("onSuccess",arguments).callChain()},
	failure:function(){this.onFailure()},
	onFailure:function(){this.fireEvent("onComplete").fireEvent("onFailure",this.xhr)},
	setHeader:function(A,B){this.headers.set(A,B);return this},
	getHeader:function(A){return $try(function(){return this.getResponseHeader(A)},this.xhr)||null},
	check:function(){
		if(!this.running){return true}
		switch(this.options.link){
			case"cancel":this.cancel();return true;case"chain":this.chain(this.send.bind(this,arguments));return false
		}
		return false
	},
	send:function(D){
		if(!this.check(D)){return this}
		this.running=true;var E=$type(D);
		if(E=="string"||E=="element"){D={data:D}}
		var A=this.options;D=$extend({data:A.data,url:A.url,method:A.method},D);
		var G=D.data,C=D.url,H=D.method;
		switch($type(G)){case"element":G=$(G).toQueryString();break;case"object":case"hash":G=Hash.toQueryString(G)}
		if(this.options.emulation&&["put","delete"].contains(H)){var B="_method="+H;G=(G)?B+"&"+G:B;H="post"}
		if(this.options.urlEncoded&&H=="post"){
			var F=(this.options.encoding)?"; charset="+this.options.encoding:"";
			this.headers.set("Content-type","application/x-www-form-urlencoded"+F)
		}
		if(G&&H=="get"){C=C+(C.contains("?")?"&":"?")+G;G=null}
		this.xhr.open(H.toUpperCase(),C,this.options.async);
		this.xhr.onreadystatechange=this.onStateChange.bind(this);
		this.headers.each(function(J,I){try{this.xhr.setRequestHeader(I,J)}catch(K){this.fireEvent("onException",[K,I,J])}},this);
		this.fireEvent("onRequest");
		this.xhr.send(G);
		if(!this.options.async){this.onStateChange()}
		return this
	},
	cancel:function(){
		if(!this.running){return this}
		this.running=false;this.xhr.abort();
		this.xhr.onreadystatechange=$empty;this.xhr=this.getXHR();
		this.fireEvent("onCancel");
		return this
	}
});

(function(){
	var A={};
	["get","post","GET","POST","PUT","DELETE"].each(function(B){
		A[B]=function(){var C=Array.link(arguments,{url:String.type,data:$defined});return this.send($extend(C,{method:B.toLowerCase()}))}}
	);
	Request.implement(A)
})();

Element.Properties.send={
	get:function(A){if(A||!this.retrieve("send")){this.set("send",A)}return this.retrieve("send")},
	set:function(A){
		var B=this.retrieve("send");if(B){B.cancel()}
		return this.store("send",new Request($extend({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")},A)))
	}
};

Element.implement({send:function(A){var B=this.get("send");B.send({data:this,url:A||B.options.url});return this}});

Request.HTML=new Class({
	Extends:Request,
	options:{update:false,evalScripts:true,filter:false},
	processHTML:function(F){
		var D=F.match(/<body[^>]*>([\s\S]*?)<\/body>/i),A;
		F=(D)?D[1]:F;F="<root>"+F+"</root>";
		if(Browser.Engine.trident){
			A=new ActiveXObject("Microsoft.XMLDOM");A.async=false;A.loadXML(F)
		}else{A=new DOMParser().parseFromString(F,"text/xml")}
		A=A.getElementsByTagName("root")[0];
		var C=new Element("div");
		for(var E=0,B=A.childNodes.length;E<B;E++){var G=Element.clone(A.childNodes[E],true,true);if(G){C.grab(G)}}
		return C
	},
	success:function(D){
		var C=this.options,B=this.response;B.html=D.stripScripts(function(E){B.javascript=E});
		var A=this.processHTML(B.html);
		B.tree=A.childNodes;B.elements=A.getElements("*");
		if(C.filter){B.tree=B.elements.filterBy(C.filter)}
		if(C.update){$(C.update).empty().adopt(B.tree)}
		if(C.evalScripts){$exec(B.javascript)}
		this.onSuccess(B.tree,B.elements,B.html,B.javascript)
	}
});

Element.Properties.load={
	get:function(A){if(A||!this.retrieve("load")){this.set("load",A)}return this.retrieve("load")},
	set:function(A){
		var B=this.retrieve("load");
		if(B){B.cancel()}
		return this.store("load",new Request.HTML($extend({link:"cancel",update:this,method:"get"},A)))
	}
};

Element.implement({load:function(){this.get("load").send(Array.link(arguments,{data:Object.type,url:String.type}));return this}});

Request.JSON=new Class({
	Extends:Request,
	options:{secure:true},
	initialize:function(A){arguments.callee.parent(A);this.headers.extend({Accept:"application/json","X-Request":"JSON"})},
	success:function(A){this.response.json=JSON.decode(A,this.options.secure);this.onSuccess(this.response.json,A)}
});

var Drag=new Class({
	Implements:[Events,Options],
	options:{snap:6,unit:"px",grid:false,style:true,limit:false,handle:false,invert:false,modifiers:{x:"left",y:"top"}},
	initialize:function(){
		var B=Array.link(arguments,{options:Object.type,element:$defined});
		this.element=$(B.element);this.document=this.element.getDocument();this.setOptions(B.options||{});
		var A=$type(this.options.handle);
		this.handles=(A=="array"||A=="collection")?$$(this.options.handle):$(this.options.handle)||this.element;
		this.mouse={now:{},pos:{}};
		this.value={start:{},now:{}};
		this.selection=(Browser.Engine.trident)?"selectstart":"mousedown";
		this.bound={
			start:this.start.bind(this),
			check:this.check.bind(this),
			drag:this.drag.bind(this),
			stop:this.stop.bind(this),
			cancel:this.cancel.bind(this),
			eventStop:$lambda(false)
		};
		this.attach()},
	attach:function(){this.handles.addEvent("mousedown",this.bound.start);return this},
	detach:function(){this.handles.removeEvent("mousedown",this.bound.start);return this},
	start:function(C){
		this.fireEvent("onBeforeStart",this.element);this.mouse.start=C.page;
		var A=this.options.limit;this.limit={x:[],y:[]};
		for(var D in this.options.modifiers){
			if(!this.options.modifiers[D]){continue}
			if(this.options.style){
				this.value.now[D]=this.element.getStyle(this.options.modifiers[D]).toInt()
			}else{
				this.value.now[D]=this.element[this.options.modifiers[D]]
			}
			if(this.options.invert){this.value.now[D]*=-1}
			this.mouse.pos[D]=C.page[D]-this.value.now[D];
			if(A&&A[D]){for(var B=2;B--;B){if($chk(A[D][B])){this.limit[D][B]=$lambda(A[D][B])()}}}
		}
		if($type(this.options.grid)=="number"){this.options.grid={x:this.options.grid,y:this.options.grid}}
		this.document.addEvents({mousemove:this.bound.check,mouseup:this.bound.cancel});
		this.document.addEvent(this.selection,this.bound.eventStop)
	},
	check:function(A){
		var B=Math.round(Math.sqrt(Math.pow(A.page.x-this.mouse.start.x,2)+Math.pow(A.page.y-this.mouse.start.y,2)));
		if(B>this.options.snap){
			this.cancel();
			this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});
			this.fireEvent("onStart",this.element).fireEvent("onSnap",this.element)
		}
	},
	drag:function(A){
		this.mouse.now=A.page;
		for(var B in this.options.modifiers){
			if(!this.options.modifiers[B]){continue}
			this.value.now[B]=this.mouse.now[B]-this.mouse.pos[B];
			if(this.options.invert){this.value.now[B]*=-1}
			if(this.options.limit&&this.limit[B]){
				if($chk(this.limit[B][1])&&(this.value.now[B]>this.limit[B][1])){
					this.value.now[B]=this.limit[B][1]
				}else{
					if($chk(this.limit[B][0])&&(this.value.now[B]<this.limit[B][0])){this.value.now[B]=this.limit[B][0]}
				}
			}
			if(this.options.grid[B]){this.value.now[B]-=(this.value.now[B]%this.options.grid[B])}
			if(this.options.style){
				this.element.setStyle(this.options.modifiers[B],this.value.now[B]+this.options.unit)
			}else{this.element[this.options.modifiers[B]]=this.value.now[B]}
		}
		this.fireEvent("onDrag",this.element)
	},
	cancel:function(A){
		this.document.removeEvent("mousemove",this.bound.check);
		this.document.removeEvent("mouseup",this.bound.cancel);
		if(A){this.document.removeEvent(this.selection,this.bound.eventStop);this.fireEvent("onCancel",this.element)}
	},
	stop:function(A){
		this.document.removeEvent(this.selection,this.bound.eventStop);
		this.document.removeEvent("mousemove",this.bound.drag);
		this.document.removeEvent("mouseup",this.bound.stop);
		if(A){this.fireEvent("onComplete",this.element)}
	}
});

Element.implement({makeResizable:function(A){return new Drag(this,$merge({modifiers:{x:"width",y:"height"}},A))}});

Drag.Move=new Class({
	Extends:Drag,
	options:{droppables:[],container:false},
	initialize:function(D,C){
		arguments.callee.parent(D,C);
		this.droppables=$$(this.options.droppables);
		this.container=$(this.options.container);
		var A=(this.element.positioned())?this.element.getStyle("position"):"absolute";
		var B=this.element.getStyles("left","top");
		if(B.left=="auto"||B.top=="auto"){this.element.position(this.element.getRelativePosition())}
		this.element.setStyle("position",A)
	},
	start:function(B){
		if(this.overed){this.overed.fireEvent("leave",[this.element,this]);this.overed=null}
		if(this.container){
			var D=this.element,J=this.container,E=J.getCoordinates(D.getOffsetParent()),F={},A={};
			["top","right","bottom","left"].each(function(K){
				F[K]=J.getStyle("padding-"+K).toInt();A[K]=D.getStyle("margin-"+K).toInt()
			},this);
			var C=D.offsetWidth+A.left+A.right,I=D.offsetHeight+A.top+A.bottom;
			var H=[E.left+F.left,E.right-F.right-C];
			var G=[E.top+F.top,E.bottom-F.bottom-I];
			this.options.limit={x:H,y:G}
		}
		arguments.callee.parent(B)
	},
	checkAgainst:function(B){
		B=B.getCoordinates();
		var A=this.mouse.now;
		return(A.x>B.left&&A.x<B.right&&A.y<B.bottom&&A.y>B.top)
	},
	checkDroppables:function(){
		var A=this.droppables.filter(this.checkAgainst,this).getLast();
		if(this.overed!=A){
			if(this.overed){
				this.overed.fireEvent("leave",[this.element,this])
			}
			this.overed=A?A.fireEvent("over",[this.element,this]):null
		}
	},
	drag:function(A){arguments.callee.parent(A);if(this.droppables.length){this.checkDroppables()}},
	stop:function(A){
		this.checkDroppables();
		if(this.overed){
			this.overed.fireEvent("drop",[this.element,this])
		}else{
			this.element.fireEvent("emptydrop",this)
		}
		return arguments.callee.parent(A)
	}
});

Element.implement({makeDraggable:function(A){return new Drag.Move(this,A)}});

var Sortables=new Class({
	Implements:[Events,Options],options:{snap:4,handle:false,revert:false,constrain:false,cloneOpacity:0.7,elementOpacity:0.3},initialize:function(A,B){this.setOptions(B);this.elements=[];this.lists=[];this.idle=true;this.addLists($$($(A)||A));if(this.options.revert){this.effect=new Fx.Morph(null,$merge({duration:250,link:"cancel"},this.options.revert))}},attach:function(){this.addLists(this.lists);return this},detach:function(){this.lists=this.removeLists(this.lists);return this},addItems:function(){Array.flatten(arguments).each(function(A){this.elements.push(A);var C=A.retrieve("sortables:start",this.start.bindWithEvent(this,A));var B=A.retrieve("sortables:insert",this.insert.bind(this,A));(this.options.handle?A.getElement(this.options.handle)||A:A).addEvent("mousedown",C);A.addEvent("over",B)},this);return this},addLists:function(){Array.flatten(arguments).each(function(A){this.lists.push(A);this.addItems(A.getChildren());A.addEvent("over",A.retrieve("sortables:insert",this.insert.bind(this,[A,"inside"])))},this);return this},removeItems:function(){var A=[];Array.flatten(arguments).each(function(B){A.push(B);this.elements.remove(B);var D=B.retrieve("sortables:start");var C=B.retrieve("sortables:insert");(this.options.handle?B.getElement(this.options.handle)||B:B).removeEvent("mousedown",D);B.removeEvent("over",C)},this);return A},removeLists:function(){var A=[];Array.flatten(arguments).each(function(B){A.push(B);this.lists.remove(B);this.removeItems(B.getChildren());B.removeEvent("over",B.retrieve("sortables:insert"))},this);return A},getClone:function(A){return A.clone(true).setStyles({margin:"0px",position:"absolute",visibility:"hidden"}).inject(this.list).position(A.getRelativePosition())},getDroppables:function(){var A=this.list.getChildren();if(!this.options.constrain){A=this.lists.concat(A).remove(this.list)}return A.remove(this.clone).remove(this.element)},insert:function(B,A){if(A){this.list=B;this.drag.droppables=this.getDroppables()}A=A||(this.element.getAllPrevious().contains(B)?"before":"after");this.element.inject(B,A);this.fireEvent("onSort",[this.element,this.clone])},start:function(B,A){if(!this.idle){return }this.idle=false;this.element=A;this.opacity=A.get("opacity");this.list=A.getParent();this.clone=this.getClone(A);this.drag=this.clone.makeDraggable({snap:this.options.snap,container:this.options.constrain&&this.clone.getParent(),droppables:this.getDroppables(),onStart:function(){B.stop();this.clone.set("opacity",this.options.cloneOpacity);this.element.set("opacity",this.options.elementOpacity);this.fireEvent("onStart",[this.element,this.clone])}.bind(this),onCancel:this.reset.bind(this),onComplete:this.end.bind(this)});this.drag.start(B)},end:function(){this.element.set("opacity",this.opacity);this.drag.detach();if(this.effect){var A=this.element.getStyles("width","height");var B=this.clone.computePosition(this.element.getPosition(this.clone.offsetParent),this.clone.getParent().positioned());this.effect.element=this.clone;this.effect.start({top:B.top,left:B.left,width:A.width,height:A.height,opacity:0.25}).chain(this.reset.bind(this))}else{this.reset()}},reset:function(){this.idle=true;this.clone.destroy();this.fireEvent("onComplete",this.element)},serialize:function(C,A){var B=this.lists.map(function(D){return D.getChildren().map(A||function(F,E){return F.get("id")},this)},this);if(this.lists.length==1){C=0}return $chk(C)&&C>=0&&C<this.lists.length?B[C]:B}});

var Tips=new Class({
	Implements:[Events,Options],options:{onShow:function(A){A.setStyle("visibility","visible")},onHide:function(A){A.setStyle("visibility","hidden")},maxTitleChars:30,showDelay:100,hideDelay:100,className:"tool",offsets:{x:16,y:16},fixed:false},initialize:function(B,A){this.setOptions(A);B=$$(B);this.document=(B.length)?B[0].ownerDocument:document;this.toolTip=new Element("div",{"class":this.options.className+"-tip",styles:{position:"absolute",top:"0",left:"0",visibility:"hidden"}},this.document).inject(this.document.body);this.wrapper=new Element("div").inject(this.toolTip);B.each(this.build,this)},build:function(B){B.$attributes.myTitle=(B.href&&B.get("tag")=="a")?B.href.replace("http://",""):(B.rel||false);if(B.title){var C=B.title.split("::");if(C.length>1){B.$attributes.myTitle=C[0].trim();B.$attributes.myText=C[1].trim()}else{B.$attributes.myText=B.title}B.removeProperty("title")}else{B.$attributes.myText=false}if(B.$attributes.myTitle&&B.$attributes.myTitle.length>this.options.maxTitleChars){B.$attributes.myTitle=B.$attributes.myTitle.substr(0,this.options.maxTitleChars-1)+"&hellip;"}B.addEvent("mouseenter",function(D){this.start(B);if(!this.options.fixed){this.locate(D)}else{this.position(B)}}.bind(this));if(!this.options.fixed){B.addEvent("mousemove",this.locate.bind(this))}var A=this.end.bind(this);B.addEvent("mouseleave",A)},start:function(A){this.wrapper.empty();if(A.$attributes.myTitle){this.title=new Element("span").inject(new Element("div",{"class":this.options.className+"-title"}).inject(this.wrapper)).set("html",A.$attributes.myTitle)}if(A.$attributes.myText){this.text=new Element("span").inject(new Element("div",{"class":this.options.className+"-text"}).inject(this.wrapper)).set("html",A.$attributes.myText)}$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this)},end:function(A){$clear(this.timer);this.timer=this.hide.delay(this.options.hideDelay,this)},position:function(A){var B=A.getPosition();this.toolTip.setStyles({left:B.x+this.options.offsets.x,top:B.y+this.options.offsets.y})},locate:function(B){var D=this.document.getSize();var A=this.document.getScroll();var C={x:this.toolTip.offsetWidth,y:this.toolTip.offsetHeight};var G={x:"left",y:"top"};for(var E in G){var F=B.page[E]+this.options.offsets[E];if((F+C[E]-A[E])>D[E]){F=B.page[E]-this.options.offsets[E]-C[E]}this.toolTip.setStyle(G[E],F)}},show:function(){if(this.options.timeout){this.timer=this.hide.delay(this.options.timeout,this)}this.fireEvent("onShow",[this.toolTip])},hide:function(){this.fireEvent("onHide",[this.toolTip])}});

var SmoothScroll=new Class({
	Extends:Fx.Scroll,initialize:function(B,C){C=C||document;var E=C.getDocument(),D=C.getWindow();arguments.callee.parent(E,B);this.links=(this.options.links)?$$(this.options.links):$$(E.links);var A=D.location.href.match(/^[^#]*/)[0]+"#";this.links.each(function(G){if(G.href.indexOf(A)!=0){return }var F=G.href.substr(A.length);if(F&&$(F)){this.useLink(G,F)}},this);if(!Browser.Engine.webkit419){this.addEvent("onComplete",function(){D.location.hash=this.anchor},true)}},useLink:function(B,A){B.addEvent("click",function(C){this.anchor=A;this.toElement(A);C.stop()}.bind(this))}});

var Slider=new Class({
	Implements:[Events,Options],options:{onTick:function(A){if(this.options.snap){A=this.toPosition(this.step)}this.knob.setStyle(this.property,A)},snap:false,offset:0,range:false,wheel:false,steps:100,mode:"horizontal"},initialize:function(E,A,D){this.setOptions(D);this.element=$(E);this.knob=$(A);this.previousChange=this.previousEnd=this.step=-1;this.element.addEvent("mousedown",this.clickedElement.bind(this));if(this.options.wheel){this.element.addEvent("mousewheel",this.scrolledElement.bindWithEvent(this))}var F,B={},C={x:false,y:false};switch(this.options.mode){case"vertical":this.axis="y";this.property="top";F="offsetHeight";break;case"horizontal":this.axis="x";this.property="left";F="offsetWidth"}this.half=this.knob[F]/2;this.full=this.element[F]-this.knob[F]+(this.options.offset*2);this.min=$chk(this.options.range[0])?this.options.range[0]:0;this.max=$chk(this.options.range[1])?this.options.range[1]:this.options.steps;this.range=this.max-this.min;this.steps=this.options.steps||this.full;this.stepSize=Math.abs(this.range)/this.steps;this.stepWidth=this.stepSize*this.full/Math.abs(this.range);this.knob.setStyle("position","relative").setStyle(this.property,-this.options.offset);C[this.axis]=this.property;B[this.axis]=[-this.options.offset,this.full-this.options.offset];this.drag=new Drag(this.knob,{snap:0,limit:B,modifiers:C,onDrag:this.draggedKnob.bind(this),onStart:this.draggedKnob.bind(this),onComplete:function(){this.draggedKnob();this.end()}.bind(this)});if(this.options.snap){this.drag.options.grid=Math.ceil(this.stepWidth);this.drag.options.limit[this.axis][1]=this.full}},set:function(A){if(!((this.range>0)^(A<this.min))){A=this.min}if(!((this.range>0)^(A>this.max))){A=this.max}this.step=Math.round(A);this.checkStep();this.end();this.fireEvent("onTick",this.toPosition(this.step));return this},clickedElement:function(C){var B=this.range<0?-1:1;var A=C.page[this.axis]-this.element.getPosition()[this.axis]-this.half;A=A.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+B*this.toStep(A));this.checkStep();this.end();this.fireEvent("onTick",A)},scrolledElement:function(A){var B=(this.options.mode=="horizontal")?(A.wheel<0):(A.wheel>0);this.set(B?this.step-this.stepSize:this.step+this.stepSize);A.stop()},draggedKnob:function(){var B=this.range<0?-1:1;var A=this.drag.value.now[this.axis];A=A.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+B*this.toStep(A));this.checkStep()},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step;this.fireEvent("onChange",this.step)}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent("onComplete",this.step+"")}},toStep:function(A){var B=(A+this.options.offset)*this.stepSize/this.full*this.steps;return this.options.steps?Math.round(B-=B%this.stepSize):B},toPosition:function(A){return(this.full*Math.abs(this.min-A))/(this.steps*this.stepSize)-this.options.offset}});

var Scroller=new Class({
	Implements:[Events,Options],options:{area:20,velocity:1,onChange:function(A,B){this.element.scrollTo(A,B)}},initialize:function(B,A){this.setOptions(A);this.element=$(B);this.listener=($type(this.element)!="element")?$(this.element.getDocument().body):this.element;this.timer=null},start:function(){this.coord=this.getCoords.bind(this);this.listener.addEvent("mousemove",this.coord)},stop:function(){this.listener.removeEvent("mousemove",this.coord);this.timer=$clear(this.timer)},getCoords:function(A){this.page=(this.listener.get("tag")=="body")?A.client:A.page;if(!this.timer){this.timer=this.scroll.periodical(50,this)}},scroll:function(){var B=this.element.getSize(),A=this.element.getScroll(),E=this.element.getPosition(),D={x:0,y:0};for(var C in this.page){if(this.page[C]<(this.options.area+E[C])&&A[C]!=0){D[C]=(this.page[C]-this.options.area-E[C])*this.options.velocity}else{if(this.page[C]+this.options.area>(B[C]+E[C])&&B[C]+B[C]!=A[C]){D[C]=(this.page[C]-B[C]+this.options.area-E[C])*this.options.velocity}}}if(D.y||D.x){this.fireEvent("onChange",[A.x+D.x,A.y+D.y])}}});

var Asset=new Hash({
	javascript:function(F,D){D=$extend({onload:$empty,document:document,check:$lambda(true)},D);var B=new Element("script",{src:F,type:"text/javascript"});var E=D.onload.bind(B),A=D.check,G=D.document;delete D.onload;delete D.check;delete D.document;B.addEvents({load:E,readystatechange:function(){if(["loaded","complete"].contains(this.readyState)){E()}}}).setProperties(D);if(Browser.Engine.webkit419){var C=(function(){if(!$try(A)){return }$clear(C);E()}).periodical(50)}return B.inject(G.head)},css:function(B,A){return new Element("link",$merge({rel:"stylesheet",media:"screen",type:"text/css",href:B},A)).inject(document.head)},image:function(C,B){B=$merge({onload:$empty,onabort:$empty,onerror:$empty},B);var D=new Image();var A=$(D)||new Element("img");["load","abort","error"].each(function(E){var F="on"+E;var G=B[F];delete B[F];D[F]=function(){if(!D){return }if(!A.parentNode){A.width=D.width;A.height=D.height}D=D.onload=D.onabort=D.onerror=null;G.delay(1,A,A);A.fireEvent(E,A,1)}});D.src=A.src=C;if(D&&D.complete){D.onload.delay(1)}return A.setProperties(B)},images:function(D,C){C=$merge({onComplete:$empty,onProgress:$empty},C);if(!D.push){D=[D]}var A=[];var B=0;D.each(function(F){var E=new Asset.image(F,{onload:function(){C.onProgress.call(this,B,D.indexOf(F));B++;if(B==D.length){C.onComplete()}}});A.push(E)});return new Elements(A)}});

Fx.Elements=new Class({
	Extends:Fx.CSS,
	initialize:function(B,A){
		this.elements=this.pass=$$(B);
		arguments.callee.parent(A)
	},
	compute:function(G,H,I){
		var C={};
		for(var D in G){
			var A=G[D],E=H[D],F=C[D]={};
			for(var B in A){F[B]=arguments.callee.parent(A[B],E[B],I)}
		}
		return C
	},
	set:function(B){
		for(var C in B){var A=B[C];for(var D in A){this.render(this.elements[C],D,A[D])}}return this
	},
	start:function(C){
		if(!this.check(C)){return this}
		var H={},I={};
		for(var D in C){
			var F=C[D],A=H[D]={},G=I[D]={};
			for(var B in F){
				var E=this.prepare(this.elements[D],B,F[B]);A[B]=E.from;G[B]=E.to
			}
		}
		return arguments.callee.parent(H,I)
	}
	});;


//2
var Prototype={
	Version:"1.5 moocompat",
	ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)",
	emptyFunction:function(){},
	K:function(A){return A}
};

Class.create=function(){return function(){this.initialize.apply(this,arguments)}};
function $_(A){if(typeof A=="string"){A=document.getElementById(A)}return A}
function $F(A){return $(A).getValue()}
Object.clone=function(A){return $merge(A)};
Object.extend=$extend;
Object.toQueryString=Hash.toQueryString;
Fx.Styles=Fx.Morph;
Fx.Style=Fx.Tween;
String.implement(
	{
	escapeHTML:function(){
		var B=document.createElement("div");
		var A=document.createTextNode(this);
		B.appendChild(A);
		return B.innerHTML
	},
	unescapeHTML:function(){
		var A=document.createElement("div");
		A.innerHTML=this.stripTags();
		return A.childNodes[0]?A.childNodes[0].nodeValue:""
	},
	stripTags:function(){
		return this.replace(/<\/?[^>]+>/gi,"")
	},
	extractScripts:function(){
		var B=new RegExp(Prototype.ScriptFragment,"img");
		var A=new RegExp(Prototype.ScriptFragment,"im");
		return(this.match(B)||[]).map(function(C){return(C.match(A)||["",""])[1]})
	},
	parseJSON:function(){
		try{return eval("("+this+")")}catch(e){}throw new SyntaxError("parseJSON")},
	parseUrl:function(){
		var A=this.match(/^(?:([^:\/?#.]+):)?(?:\/\/)?(([^:\/?#]*)(?::(\d*))?)((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[\?#]|$)))*\/?)?([^?#\/]*))?(?:\?([^#]*))?(?:#(.*))?/)||[];
		return A.associate(["uri","scheme","authority","host","port","path","directory","file","query","fragment"])},
	setURL:function(){
		var A=/(http|https|ftp)([^ ]+)/ig;
		return this.replace(A,'<a href="$1$2" target="_blank">$1$2</a>')
	},
	nl2br:function(){return this.replace(/\n/,"<br>")}
	}
);
Function.implement({bindAsEventListener:function(B,A){return this.create({bind:B,event:true,"arguments":A})}});
Array.implement({
	inject:function(A,B){
		this.each(function(D,C){A=B(A,D,C)});
		return A
	},
	detect:function(B){
		var A;this.each(function(D,C){if(B(D,C)){A=D;return A}});
		return A
	}
});
Native.implement([Element,Document],{getElementsByClassName:function(A){return this.getElements("."+A)}});
Element.implement({
	interpolate:function(){
		var A=arguments[0].split(/[{}]/);
		for(var B=0;B<A.length;B++){
			if(A[B].trim()!=""&&arguments[1][A[B]]){A[B]=arguments[1][A[B]]}
		}
		for(var B=0;B<A.length;B++){
			if(typeof A[B]=="string"){
				if(A[B].length!=0){this.appendChild(document.createTextNode(A[B]))}
			}else{A[B].inject(this)}
		}
		return this
	},
	hide:function(){
		this.style.display="none";
		return this
	},
	show:function(){
		this.style.display="";
		return this
	},
	getValue:function(){return this.get("value")},
	effect:function(B,A){return new Fx.Style(this,B,A)},
	yellowFade:function(B,C){
		if(!$defined(B)){B="#FFFF9C"}
		if(!$defined(C)){C="#FFFFFF"}
		var A=this.get("tween","background-color",{duration:500,link:"chain"});
		A.start(B).chain(function(){A.start(C)});
		return this
	},
	wait:function(C,A){
		var A=$merge(A);
		if(!A||!A.notEmpty){this.empty()}
		delete A.notEmpty;
		var B={};
		if(typeof A=="object"){$extend(B,A)}
		var D=new Element(
			"div",{"class":"spinner",html:'<div>Loading</div><img src="'+App.getStaticUrl("/img/panel/loading-02.gif")+'" alt="" />',styles:B}
		).inject(this);
		if(C){C.addEvent("onComplete",function(){D.destroy()})}
		return this
	},
	endWait:function(){var A=this.getElement(".spinner");if(A){A.destroy()}}
});
$extend(Element,{
	getDimensions:function(C){
		C=$_(C);
		var G=C.style.display;
		if(G!="none"&&G!=null){
			return{
				width:C.offsetWidth,
				height:C.offsetHeight
			}
		}
		var B=C.style;
		var F=B.visibility;
		var D=B.position;
		var A=B.display;
		B.visibility="hidden";B.position="absolute";B.display="block";
		var H=C.clientWidth;
		var E=C.clientHeight;
		B.display=A;B.position=D;B.visibility=F;
		return{width:H,height:E}
	},
	visible:function(A){return $_(A).style.display!="none"},
	hide:function(A){
		A=$_(A);
		A.style.display="none";
		return A
	},
	show:function(A){A=$_(A);A.style.display="";return A},
	setStyle:function(A,B){return $(A).setStyles(B)},
	hasClassName:function(A,B){A=$_(A);return A.className.contains(B," ")},
	addClassName:function(A,B){
		A=$_(A);
		if(!Element.hasClassName(A,B)){A.className=(A.className+" "+B).clean()}
		return A
	},
	removeClassName:function(A,B){
		A=$_(A);
		A.className=A.className.replace(new RegExp("(^|\\s)"+B+"(?:\\s|$)"),"$1").clean();
		return A
	},
	remove:function(A){return $(A).remove()},
	update:function(B,A){$_(B).innerHTML=A}});
$extend(Event,{
	KEY_BACKSPACE:8,
	KEY_TAB:9,
	KEY_RETURN:13,
	KEY_ESC:27,
	KEY_LEFT:37,
	KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,
	pointerX:function(A){
		if(!A.$extended){A=new Event(A)}return A.page.x||(A.client.y+(document.documentElement.scrollLeft||document.body.scrollLeft))
	},
	pointerY:function(A){
		if(!A.$extended){A=new Event(A)}return A.page.y||(A.client.y+(document.documentElement.scrollTop||document.body.scrollTop))
	},
	element:function(A){
		return A.target||new Event(A).target
	},
	stop:function(A){
		if(!A||!A.$extended){A=new Event(A)}A.stop()
	},
	findElement:function(C,B){
		var A=C.target||new Event(C).target;while(A.parentNode&&(!A.tagName||(A.tagName.toUpperCase()!=B.toUpperCase()))){A=A.parentNode}return A
	},
	observe:function(D,C,B,A){
		D=$_(D);if(C=="keypress"&&$defined(window.webkit)){C="keydown"}$(D).addEvent(C,B)
	},
	stopObserving:function(D,C,B,A){$(D).removeEvent(C,B)}
});
var Ajax={};
Ajax.Request=new Class({
	initialize:function(B,A){
		A.url=B;
		if(A.method){A.method=A.method.toLowerCase()}
		A.data=A.parameters||A.postBody||"";
		if(A.onComplete){
			this.onCompleteFunction=A.onComplete;
			A.onComplete=this.onComplete.bind(this)
		}
		if(A.onSuccess){this.onSuccessFunction=A.onSuccess;A.onSuccess=this.onSuccess.bind(this)}
		if(A.onFailure){this.onFailureFunction=A.onFailure;A.onFailure=this.onFailure.bind(this)}
		this.ajax=new Request(A).send()
	},
	onSuccess:function(){if(this.onSuccessFunction&&this.ajax.isSuccess()){this.onSuccessFunction(this.ajax.xhr)}},
	onComplete:function(){if(this.onCompleteFunction){this.onCompleteFunction(this.ajax.xhr)}},
	onFailure:function(){if(this.onFailureFunction&&!this.ajax.isSuccess()){this.onFailureFunction(this.ajax.xhr)}},
	request:function(A){this.ajax.send(A)}});

PeriodicalExecuter=new Class({
	initialize:function(B,A){
		this.callback=B;
		this.frequency=A;
		this.currentlyExecuting=false;
		this.registerCallback()
	},
	registerCallback:function(){
		this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)
	},
	stop:function(){
		if(!this.timer){return }
		clearInterval(this.timer);
		this.timer=null
	},
	onTimerEvent:function(){
		if(!this.currentlyExecuting){
			try{
				this.currentlyExecuting=true;
				this.callback(this)
			}finally{this.currentlyExecuting=false}
		}
	}
});

var Form={getElements:function(A){return $(A).getElements("input, textarea, select")}};

var Position={
	cumulativeOffset:function(B){
		var A=0,C=0;
		do{
			A+=B.offsetTop||0;
			C+=B.offsetLeft||0;
			B=B.offsetParent
		}while(B);
		return[C,A]
	},
	page:function(D){
		var A=0,C=0;
		var B=D;
		do{
			A+=B.offsetTop||0;
			C+=B.offsetLeft||0;
			if(B.offsetParent==document.body){if(B.getStyle("position")=="absolute"){break}}
		}while(B=B.offsetParent);
		B=D;
		do{
			if(!window.opera||B.tagName=="BODY"){A-=B.scrollTop||0;C-=B.scrollLeft||0}
		}while(B=B.parentNode);
		return[C,A]
	},
	clone:function(C,E){
		var A=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});
		C=$(C);
		var D=Position.page(C);
		E=$(E);
		var F=[0,0];
		var B=null;
		if(E.getStyle("position")=="absolute"){B=Position.offsetParent(E);F=Position.page(B)}
		if(B==document.body){F[0]-=document.body.offsetLeft;F[1]-=document.body.offsetTop}
		if(A.setLeft){E.style.left=(D[0]-F[0]+A.offsetLeft)+"px"}
		if(A.setTop){E.style.top=(D[1]-F[1]+A.offsetTop)+"px"}
		if(A.setWidth){E.style.width=C.offsetWidth+"px"}
		if(A.setHeight){E.style.height=C.offsetHeight+"px"}
	},
	offsetParent:function(A){
		if(A.offsetParent){return A.offsetParent}
		if(A==document.body){return A}
		while((A=A.parentNode)&&A!=document.body){
			if(A.getStyle("position")!="static"){return A}
		}
		return document.body
	},
	within:function(B,A,C){
		this.xcomp=A;
		this.ycomp=C;
		this.offset=this.cumulativeOffset(B);
		return(C>=this.offset[1]&&C<this.offset[1]+B.offsetHeight&&A>=this.offset[0]&&A<this.offset[0]+B.offsetWidth)
	}
};
Hash.implement({toQueryString:function(){
	var A=[];
	Hash.each(this,function(C,B){
		$splat(C).each(function(D){
			if($type(D)=="object"||$type(D)=="hash"){
				Hash.each(D,function(E,F){
					$splat(E).each(function(G){
						A.push(B+"["+F+"]="+encodeURIComponent(G))
					})
				})
			}else{
				A.push(B+"="+encodeURIComponent(D))
			}
		})
	});
	return A.join("&")
}});;

//3
function md5(N){
	var L=0;var H=8;function I(O){return M(D(A(O),O.length*H))}function D(Y,T){Y[T>>5]|=128<<((T)%32);Y[(((T+64)>>>9)<<4)+14]=T;var X=1732584193;var W=-271733879;var V=-1732584194;var U=271733878;for(var Q=0;Q<Y.length;Q+=16){var S=X;var R=W;var P=V;var O=U;X=G(X,W,V,U,Y[Q+0],7,-680876936);U=G(U,X,W,V,Y[Q+1],12,-389564586);V=G(V,U,X,W,Y[Q+2],17,606105819);W=G(W,V,U,X,Y[Q+3],22,-1044525330);X=G(X,W,V,U,Y[Q+4],7,-176418897);U=G(U,X,W,V,Y[Q+5],12,1200080426);V=G(V,U,X,W,Y[Q+6],17,-1473231341);W=G(W,V,U,X,Y[Q+7],22,-45705983);X=G(X,W,V,U,Y[Q+8],7,1770035416);U=G(U,X,W,V,Y[Q+9],12,-1958414417);V=G(V,U,X,W,Y[Q+10],17,-42063);W=G(W,V,U,X,Y[Q+11],22,-1990404162);X=G(X,W,V,U,Y[Q+12],7,1804603682);U=G(U,X,W,V,Y[Q+13],12,-40341101);V=G(V,U,X,W,Y[Q+14],17,-1502002290);W=G(W,V,U,X,Y[Q+15],22,1236535329);X=C(X,W,V,U,Y[Q+1],5,-165796510);U=C(U,X,W,V,Y[Q+6],9,-1069501632);V=C(V,U,X,W,Y[Q+11],14,643717713);W=C(W,V,U,X,Y[Q+0],20,-373897302);X=C(X,W,V,U,Y[Q+5],5,-701558691);U=C(U,X,W,V,Y[Q+10],9,38016083);V=C(V,U,X,W,Y[Q+15],14,-660478335);W=C(W,V,U,X,Y[Q+4],20,-405537848);X=C(X,W,V,U,Y[Q+9],5,568446438);U=C(U,X,W,V,Y[Q+14],9,-1019803690);V=C(V,U,X,W,Y[Q+3],14,-187363961);W=C(W,V,U,X,Y[Q+8],20,1163531501);X=C(X,W,V,U,Y[Q+13],5,-1444681467);U=C(U,X,W,V,Y[Q+2],9,-51403784);V=C(V,U,X,W,Y[Q+7],14,1735328473);W=C(W,V,U,X,Y[Q+12],20,-1926607734);X=K(X,W,V,U,Y[Q+5],4,-378558);U=K(U,X,W,V,Y[Q+8],11,-2022574463);V=K(V,U,X,W,Y[Q+11],16,1839030562);W=K(W,V,U,X,Y[Q+14],23,-35309556);X=K(X,W,V,U,Y[Q+1],4,-1530992060);U=K(U,X,W,V,Y[Q+4],11,1272893353);V=K(V,U,X,W,Y[Q+7],16,-155497632);W=K(W,V,U,X,Y[Q+10],23,-1094730640);X=K(X,W,V,U,Y[Q+13],4,681279174);U=K(U,X,W,V,Y[Q+0],11,-358537222);V=K(V,U,X,W,Y[Q+3],16,-722521979);W=K(W,V,U,X,Y[Q+6],23,76029189);X=K(X,W,V,U,Y[Q+9],4,-640364487);U=K(U,X,W,V,Y[Q+12],11,-421815835);V=K(V,U,X,W,Y[Q+15],16,530742520);W=K(W,V,U,X,Y[Q+2],23,-995338651);X=E(X,W,V,U,Y[Q+0],6,-198630844);U=E(U,X,W,V,Y[Q+7],10,1126891415);V=E(V,U,X,W,Y[Q+14],15,-1416354905);W=E(W,V,U,X,Y[Q+5],21,-57434055);X=E(X,W,V,U,Y[Q+12],6,1700485571);U=E(U,X,W,V,Y[Q+3],10,-1894986606);V=E(V,U,X,W,Y[Q+10],15,-1051523);W=E(W,V,U,X,Y[Q+1],21,-2054922799);X=E(X,W,V,U,Y[Q+8],6,1873313359);U=E(U,X,W,V,Y[Q+15],10,-30611744);V=E(V,U,X,W,Y[Q+6],15,-1560198380);W=E(W,V,U,X,Y[Q+13],21,1309151649);X=E(X,W,V,U,Y[Q+4],6,-145523070);U=E(U,X,W,V,Y[Q+11],10,-1120210379);V=E(V,U,X,W,Y[Q+2],15,718787259);W=E(W,V,U,X,Y[Q+9],21,-343485551);X=F(X,S);W=F(W,R);V=F(V,P);U=F(U,O)}return Array(X,W,V,U)}function B(T,Q,P,O,S,R){return F(J(F(F(Q,T),F(O,R)),S),P)}function G(Q,P,U,T,O,S,R){return B((P&U)|((~P)&T),Q,P,O,S,R)}function C(Q,P,U,T,O,S,R){return B((P&T)|(U&(~T)),Q,P,O,S,R)}function K(Q,P,U,T,O,S,R){return B(P^U^T,Q,P,O,S,R)}function E(Q,P,U,T,O,S,R){return B(U^(P|(~T)),Q,P,O,S,R)}function F(O,R){var Q=(O&65535)+(R&65535);var P=(O>>16)+(R>>16)+(Q>>16);return(P<<16)|(Q&65535)}function J(O,P){return(O<<P)|(O>>>(32-P))}function A(R){var Q=Array();var O=(1<<H)-1;for(var P=0;P<R.length*H;P+=H){Q[P>>5]|=(R.charCodeAt(P/H)&O)<<(P%32)}return Q}function M(Q){var P=L?"0123456789ABCDEF":"0123456789abcdef";var R="";for(var O=0;O<Q.length*4;O++){R+=P.charAt((Q[O>>2]>>((O%4)*8+4))&15)+P.charAt((Q[O>>2]>>((O%4)*8))&15)}return R}return I(N)};;

//4
String.sanitize=function(A){return A.replace(/ /g,"_").replace(/[éèêë]/g,"e")};
String.toAnchor=function(A){return A.unescapeHTML().replace(/ /g,"_").replace(/[éèêë]/g,"e")};
String.isEmail=function(B){var A=/^([a-zA-Z0-9_.\-+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;return A.test(B)};
String.parseQuery=function(C){
	var B=C.split(/[&;]/);
	var A={};
	if(B.length){
		B.each(function(E){
			var D=E.split("=");
			if(D.length&&D.length==2){
				A[decodeURIComponent(D[0])]=decodeURIComponent(D[1])
			}
		})
	}
	return A};
String.prototype.truncate=function(B,A){B=B||30;A=A===undefined?"...":A;return this.length>B?this.slice(0,B-A.length)+A:this};
String.format=function(B){var A=Array.prototype.slice.call(arguments,1);return B.replace(/\{(\d+)\}/g,function(C,D){return A[D]})};
String.prototype.format=function(){var A=arguments;return this.replace(/\{(\d+)\}/g,function(B,C){return A[C]})};
String.prototype.s=function(){var A=arguments,B=-1;return this.replace(/%s/g,function(C){return A[++B]||C})};
String.highlight=function(F,H){
	if(typeof F!="string"){return F}
	highlightStartTag='<span class="highlight"><b>';
	highlightEndTag="</b></span>";
	var D="";
	var C=-1;
	var E=[];
	var I=F.toLowerCase();
	H=H.toLowerCase();
	E.push(H);
	if(H.indexOf("&")!=-1){var G=H.replace(/&/g,"&amp;");E.push(G)}
	var J=H.length;
	while(F.length>0){
		var A=C+1;
		for(var B=0;B<J;B++){search=E[B];C=I.indexOf(search,A);if(C!=-1){break}}
		if(C<0){D+=F;break}
		if(F.lastIndexOf(">",C)<F.lastIndexOf("<",C)){continue}
		if(I.lastIndexOf("/script>",C)<I.lastIndexOf("<script",C)){continue}
		D+=F.substring(0,C)+highlightStartTag+F.substr(C,search.length)+highlightEndTag;
		F=F.substr(C+search.length);
		I=F.toLowerCase();
		C=-1
	}return D};;

//5
Array.prototype.normalize=function(D){
	var A=0;
	var C=D/this.inject(0,function(E,F){return E+F});
	for(var B=0;B<this.length-1;B++){A+=(this[B]*=C)}
	this[this.length-1]=D-A};
if(!Array.prototype.equals){
	Array.prototype.equals=function(C){
		if(!C){return false}
		var A=this.length;
		if(A!=C.length){return false}
		for(var B=0;B<A;B++){if(this[B]!=C[B]){return false}}
		return true
	}};;

//6
var Utils={};
Utils.getChildrenByTagName=function(D,B){
	var C=(D&&D.childNodes)?D.childNodes.length:0;
	var A=[];
	for(var E=0;E<C;E++){
		if(D.childNodes[E].nodeName==B){A.push(D.childNodes[E])}
	}
	return A};
Utils.getSafeUrl=function(C,A,G){
	if(typeof A=="undefined"){A=true}
	if(typeof G=="undefined"){G=false}
	var F;
	if(C.substr(0,7)=="http://"){F=7}else{if(C.substr(0,8)=="https://"){F=8}else{F=7;C="http://"+C}}
	if(!A){return C}
	var E=C.substr(F).indexOf("/");
	host=C.substr(F,E-F);
	var D=host.indexOf("@");
	if(D!=-1){
		var B=host.substr(0,D).indexOf(":");
		if(G){B=0;D+=1}
		if(B!=-1){host=host.substr(0,B)+host.substr(D);C=C.substr(0,F)+host+C.substr(E)}
	}
	return C};
Utils.redirect=function(B,C,A){
	if(B&&B.href){
		new Request().post("/proxy/ajaxProxy.php","url="+encodeURIComponent("http://track.netvibes.com/?module="+C+"&uri="+B.href+"&referrer="+window.location.href+"&reg="+(App.registeredUser?"1":"0")));
		if(!A){window.open(B.href)}else{window.location.href=B.href}}};
var ua=navigator.userAgent.toLowerCase();
Browser.isMozilla=(typeof document.implementation!="undefined")&&(typeof document.implementation.createDocument!="undefined")&&(typeof HTMLDocument!="undefined");

Browser.isIE=window.ActiveXObject?true:false;
Browser.isFirefox=(ua.indexOf("firefox")!=-1)||(ua.indexOf("iceweasel")!=-1)||(ua.indexOf("gecko")!=-1);
Browser.isSafari=(ua.indexOf("safari")!=-1);
Browser.isOpera=(typeof window.opera!="undefined");
Browser.isKonqueror=(ua.indexOf("konqueror")!=-1);
Browser.isWindows=(navigator.platform.indexOf("Win")!=-1);
Browser.isMacOS=(navigator.platform.indexOf("Mac")!=-1)||(navigator.platform.indexOf("iPhone")!=-1);
Browser.isLinux=(navigator.platform.indexOf("Linux")!=-1);
if(Browser.isMozilla){HTMLElement.prototype.removeNode=function(){this.parentNode.removeChild(this)}}
Browser.os="unknown";
Browser.osVersion="unknown";
Browser.name="unknown";
Browser.version=1;
if(Browser.isFirefox){
	Browser.name="firefox";
	if(ua.indexOf("minefield")!=-1){Browser.version=3}else{Browser.version=parseFloat(ua.substr(ua.indexOf("firefox")+8,3))}
}else{
	if(Browser.isOpera){
		Browser.name="opera";if(window.opera.version){Browser.version=parseInt(parseFloat(window.opera.version())*10)/10}else{Browser.version=7.5}
	}else{
		if(Browser.isIE){
			Browser.name="msie";
			var re=new RegExp("msie ([0-9]{1,}[.0-9]{0,})");
			if(re.exec(ua)!=null){Browser.version=parseInt(RegExp.$1,10)}else{Browser.version=3}
		}else{
			if(Browser.isSafari){
				Browser.name="safari";
				var kitName="applewebkit/";
				var kitVersion=ua.substring(ua.indexOf(kitName)+kitName.length,ua.length);
				kitVersion=parseInt(kitVersion.substring(0,kitVersion.indexOf(" ")));
				Browser.version=kitVersion>=500?3:kitVersion>=400?2:kitVersion>=300?1.3:kitVersion>100?1.2:1
			}else{
				if(Browser.isKonqueror){
					Browser.name="konqueror";
					var khtmlName="konqueror/";
					var khtmlVersion=ua.substring(ua.indexOf(khtmlName)+khtmlName.length,ua.length);
					Browser.version=parseFloat(khtmlVersion.substring(0,khtmlVersion.indexOf(";")))
				}
			}
		}
	}
}
if(Browser.isLinux){
	Browser.os="linux";
	if(ua.indexOf("ubuntu")>-1){Browser.osVersion="ubuntu"}else{
		if(ua.indexOf("suse")>-1){Browser.osVersion="suse"}else{
			if(ua.indexOf("fedora")>-1){
				Browser.osVersion="fedora"
			}else{if(ua.indexOf("debian")>-1){Browser.osVersion="debian"}}
		}
	}
}else{
	if(Browser.isMacOS){Browser.os="macos";if(ua.indexOf("mac os x")>-1){Browser.osVersion="x"}else{if(ua.indexOf("iphone")>-1){Browser.osVersion="iphone"}}}else{if(Browser.isWindows){Browser.os="windows";if(ua.indexOf("windows nt 5.1")>-1){Browser.osVersion="xp"}else{if(ua.indexOf("windows nt 5.0")>-1){Browser.osVersion="2000"}else{if(ua.indexOf("windows nt 6.0")>-1){Browser.osVersion="vista"}else{if(ua.indexOf("windows nt")>-1){Browser.osVersion="nt"}else{if(ua.indexOf("windows 98")>-1){Browser.osVersion="98"}else{if(ua.indexOf("windows 95")>-1){Browser.osVersion="95"}}}}}}}}
}
Browser.getDocumentWidth=function(){
	return(document.documentElement&&document.documentElement.scrollWidth)||document.body.scrollWidth};
Browser.getDocumentHeight=function(){
	return(document.documentElement&&document.documentElement.scrollHeight)||document.body.scrollHeight};
Browser.getClientWidth=function(){
	return(window.innerWidth||(document.documentElement&&document.documentElement.clientWidth)||(document.body&&document.body.clientWidth)||0)};
Browser.getClientHeight=function(){
	return(window.innerHeight||(document.documentElement&&document.documentElement.clientHeight)||(document.body&&document.body.clientHeight)||0)};
Browser.getScrollTop=function(){return(document.documentElement&&document.documentElement.scrollTop)||(document.body&&document.body.scrollTop)||0};
Browser.getScrollLeft=function(){return(document.documentElement&&document.documentElement.scrollLeft)||(document.body&&document.body.scrollLeft)||0};
if(!Object.prototype.hasOwnProperty){
	Object.prototype.hasOwnProperty=function(B){
		try{var A=this.constructor.prototype;while(A){if(A[B]==this[B]){return false}A=A.prototype}}catch(C){}return true
	}
}
document.setActiveStyleSheet=function(D){
	var A=document.getElementsByTagName("link");
	for(var B=0,C;C=A[B];B++){
		if(C.getAttribute("rel").indexOf("style")!=-1&&C.getAttribute("title")){
			C.disabled=true;if(C.getAttribute("title")==D){C.disabled=false}
		}
	}
};
document.getActiveStyleSheet=function(){
	var A=document.getElementsByTagName("link");
	for(var B=0,C;C=A[B];B++){
		if(C.getAttribute("rel").indexOf("style")!=-1&&C.getAttribute("title")&&!C.disabled){return C.getAttribute("title")}}return null};
document.getPreferredStyleSheet=function(){
	var A=document.getElementsByTagName("link");
	for(var B=0,C;C=A[B];B++){
		if(C.getAttribute("rel").indexOf("style")!=-1&&C.getAttribute("rel").indexOf("alt")==-1&&C.getAttribute("title")){
			return C.getAttribute("title")
		}
	}
	return null};
document.addPreferredStyleSheet=function(A,B){
	if(B==document.getPreferredStyleSheet()){return }
	$$("link").each(function(C){
		if(C.getAttribute("rel").indexOf("style")!=-1&&C.getAttribute("rel").indexOf("alt")==-1&&C.getAttribute("title")){C.remove()}
	});
	new Element("link",{rel:"stylesheet",type:"text/css",href:A,title:B}).inject(document.head)};
function ToRGB1(C,B,A){
	if(A>360){A-=360}else{if(A<0){A+=360}}
	if(A<60){C=C+(B-C)*A/60}else{if(A<180){C=B}else{if(A<240){C=C+(B-C)*(240-A)/60}}}
	return Math.round(C*255)
}
function HSLtoRGB(C,B,A){
	var D,E;
	if(B==0){return[A,A,A]}
	C=C*360/255;
	B/=255;
	A/=255;
	if(A<=0.5){D=A+A*B}else{D=A+B-A*B}
	E=2*A-D;
	return[ToRGB1(E,D,C+120),ToRGB1(E,D,C),ToRGB1(E,D,C-120)]
}
function cssColorToRGB(B){
	var A;
	if(B.indexOf("#")==0){
		B=B.toUpperCase();
		return[hex2dec(B.substr(1,2)),hex2dec(B.substr(3,2)),hex2dec(B.substr(5,2))]
	}else{
		if(B.indexOf("rgb")==0){A=(B.substr(4,B.indexOf(")")-4)).split(",");return A}}}
function hex2dec(C){var D="0123456789ABCDEF";var B=0;for(var A=C.length-1;A>=0;A--){B+=Math.pow(16,C.length-A-1)*D.indexOf(C.charAt(A))}return B}
function dec2hex(C){var B="0123456789ABCDEF";var A=B.substr(C&15,1);while(C>15){C>>=4;A=B.substr(C&15,1)+A}if(A.length==1){A="0"+A}return A}
var crc32=function(F,E){
	if(typeof E=="undefined"){E=0}
	var D="00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D";var G=0;var A=0;E=E^(-1);var B=B=F.length;for(var C=0;C<B;C++){G=(E^F.charCodeAt(C))&255;A="0x"+D.substr(G*9,8);E=(E>>>8)^A}return E^(-1)};
	
var baseConvert=function(H,I,F){
	var A=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];var J=H.toString().toLowerCase();var D=1;var E=0;for(var G=J.length-1;G>=0;G--){var K=J.charCodeAt(G);if(K>=48&&K<=57){K-=48}else{if(K>=97&&K<=122){K-=97-10}}E+=K*D;D*=I}var C="";var B=0;while(E>0){B=E%F;E=Math.floor(E/F);C=A[B]+""+C}return C};
Utils.smallColorPicker=function(K,L,J){
	if(typeof L=="string"&&L.indexOf("#")==0){
		actualRGB=L.substr(1,6);
		L=[hex2dec(L.substr(1,2)),hex2dec(L.substr(3,2)),hex2dec(L.substr(5,2))]
	}else{L=false}
	if(typeof J=="undefined"){J=8}
	var I=document.createElement("div");
	I.innerHTML="x";
	I.style.position="absolute";
	I.id="settingsColorPickerCross";
	if(Browser.isIE){I.style.marginTop="-4px";I.style.marginLeft="-2px"}else{I.style.marginTop="-9px";I.style.marginLeft="2px"}
	var N=document.createElement("table");
	N.style.borderCollapse="collapse";
	N.style.cursor="pointer";
	N.style.clear="both";
	var G=document.createElement("tbody");
	for(var E=0;E<=256;E+=8){
		var H=document.createElement("tr");
		for(var M=-8;M<=256;M+=8){
			var D=document.createElement("td");
			D.style.height=J+"px";
			D.style.width=J+"px";
			var F="white";
			if(M==-8){
				F=[E,E,E];
				var A="rgb("+E+","+E+","+E+")"
			}else{
				var C=E/256*(256-16)+8;F=HSLtoRGB(M,240,C);
				var A="rgb("+F[0]+","+F[1]+","+F[2]+")"
			}
			D.onclick=function(P){
				cssColor=this.style.backgroundColor;
				var O=cssColorToRGB(cssColor);
				O=dec2hex(O[0])+dec2hex(O[1])+dec2hex(O[2]);
				this.appendChild(I);
				I.style.display="block";
				this.style.textAlign="center";
				K(cssColor,O);
				var Q=[hex2dec(O.substr(0,2)),hex2dec(O.substr(2,2)),hex2dec(O.substr(4,2))];
				if(Q[0]==Q[1]&&Q[1]==Q[2]){
					if(Q[0]>130){this.style.color="black"}else{this.style.color="white"}
				}else{this.style.color="rgb("+(255-Q[0])+","+(255-Q[1])+","+(255-Q[2])+")"}
			};
			if(L&&L[0]==F[0]&&L[1]==F[1]&&L[2]==F[2]){
				if(L[0]==L[1]&&L[1]==L[2]){
					if(L[0]>130){D.style.color="black"}else{D.style.color="white"}
				}else{D.style.color="rgb("+(255-F[0])+","+(255-F[1])+","+(255-F[2])+")"}
				D.style.textAlign="center";
				D.appendChild(I);
				L=false
			}
			D.style.backgroundColor=A;
			H.appendChild(D)
		}
		G.appendChild(H)
	}
	N.appendChild(G);
	var B=document.createElement("p");
	B.align="center";
	B.appendChild(N);
	return B};
if(typeof _!="function"){_=function(A){return A}};;

//7
var proxyURL=NV_PATH+"proxy/xmlProxy.php?url=";
var feedProxyURL=NV_PATH+"proxy/feedProxy.php?url=";
var ecosystemURL="http://"+NV_ECO+"/";
App.UI={};
Netvibes={};
Netvibes.UI={};
Netvibes.UI._idIncrement=0;
Netvibes.UI.createIcon=function(B,E,D,A,C){
	if(typeof C=="undefined"){
		return new Element("img",{src:App.getStaticUrl("/img/s.gif"),"class":"icon "+B,alt:E,title:E,width:D,height:A})
	}else{
		return'<img src="'+App.getStaticUrl("/img/s.gif")+'" width="'+D+'" height="'+A+'" class="icon '+B+'" alt="'+E+'" title="'+E+'" />'
	}
};
if(App.visit&&!App.myUniverse){App.staticUniverse=true}

User.feedsId=null;
App.moduleList=[];
App.userCustom={numCol:3};
var appLocation=window.location.href;
var URLDomain=appLocation.substring(0,appLocation.indexOf("/",7));
if(!URLDomain){URLDomain=appLocation}
App.location=URLDomain;
App.selectedTab=0;
App.selectedTabObj=null;
App.tabList=[];
App.tabEditing=-1;
App.tabTop=80;
App.tabBottom=100;
App.tabDrag=null;
App.defaultSettings={showTitle:1,showFeedNav:1,rssSpace:0,hideFavIcons:0,dontPreload:1,keyboardNav:0,hideSearch:1,unreadPosition:"left",enableFx:1};
App.draggingItem=false;
Function.empty=function(){};
App.isPremium=function(){return(typeof App.premium!="undefined"&&App.premium&&window.top.location!=window.location)};
App.getStaticUrl=function(A){
	return NV_STATIC+A};
App.collapseAllModules=function(){
	var C=[];
	for(var B=0,A;A=App.moduleList[B];B++){
		if(A.dataObj.tab==App.selectedTab){
			if(A.dataObj.moduleName=="Meebo"){continue}A.collapse("nosave");C.push(A.dataObj.id)
		}
	}
	if(C.length>0){App.saveUserData("collapseExpand",{status:0,modules:C})}};
App.expandAllModules=function(){
	var C=[];for(var B=0,A;A=App.moduleList[B];B++){if(A.dataObj.tab==App.selectedTab){if(A.dataObj.moduleName=="Meebo"){continue}A.expand("nosave");C.push(A.dataObj.id)}}if(C.length>0){App.saveUserData("collapseExpand",{status:1,modules:C})}};
App.collapseExpand=function(C){
	var B=$("collapseExpand");var A=$(B.getElementsByTagName("img")[0]);if(B.rel=="collapse"){if(C){App.expandAllModules()}A.removeClass("actions-window-expand").addClass("actions-window-collapse");A.title=A.alt=_("Collapse all");B.rel="expand"}else{if(C){App.collapseAllModules()}A.removeClass("actions-window-collapse").addClass("actions-window-expand");A.title=A.alt=_("Expand all");B.rel="collapse"}};
App.clearSelection=function(){
	try{if(window.getSelection){if(Browser.isSafari){window.getSelection().collapse()}else{window.getSelection().removeAllRanges()}}else{if(document.selection&&document.selection.clear){document.selection.clear()}}return true}catch(A){}};
App.DragMe=function(A,D,F,G,I,H,K){
	if(typeof F=="undefined"){F=function(){}}
	if(typeof G=="undefined"){G=function(){}}
	if(typeof I=="undefined"){I=function(){}}
	if(typeof H=="undefined"){H=null}
	if(typeof K=="undefined"){K=false}
	App.Drag.init(A,D,H);moduleGhost.elm.style.display="none";
	var E=null;var C=[];
	var J=function(M){
		var L=[];var N=M.childNodes.length;
		for(var O=0;O<N;O++){
			if(!M.childNodes[O].dataObj&&M.childNodes[O]!=moduleGhost.elm){continue}
			if(!M.childNodes[O].isDragging&&(M.childNodes[O]==moduleGhost.elm||M.childNodes[O].dataObj.tab==App.selectedTab)){L.push(M.childNodes[O])}
		}
		return L
	};
	var B=function(L,O){var M=L.length;for(var N=0;N<M;N++){if(L[N]==moduleGhost.elm){return N}}};
	D.onDragStart=function(P,N,T,S){
		if(F(P,N,T,S)===false){return }
		var L=findPosX(this);
		var O=findPosY(this);
		Element.addClassName(this,"beingDragged");
		var Q=this.offsetWidth;
		if(Q){this.style.width=(Q-5)+"px"}
		this.style.left=(L-5)+"px";
		this.style.top=(O-4)+"px";
		moduleGhost.elm.style.height=this.offsetHeight+"px";
		var M;
		if(D.parentNode&&D.parentNode.getAttribute("colNum")){M=D}else{M=App.ColManager.col1;if(M.firstChild){M=M.firstChild}}
		if(M.parentNode){M.parentNode.insertBefore(moduleGhost.elm,M)}else{M.appendChild(moduleGhost.elm)}
		this.style.position="absolute";
		this.isDragging=true;
		if(typeof this.dontDragYet=="undefined"){App.draggingItem=true}
		moduleGhost.col=this.parentNode;
		var R=App.tabList[App.tabList.length-1].elm;
		App.tabBottom=findPosY(R)+R.offsetHeight;
		moduleGhost.elm.style.visibility="hidden";
		moduleGhost.elm.style.display="block";
		this.col1X=findPosX(App.ColManager.col1);
		if(App.userCustom.numCol>=2){this.col2X=findPosX(App.ColManager.col2)}
		if(App.userCustom.numCol>=3){this.col3X=findPosX(App.ColManager.col3)}
		if(App.userCustom.numCol>=4){this.col4X=findPosX(App.ColManager.col4)}
		if(typeof this.dontDragYet!="undefined"){moduleGhost.elm.style.display="none"}
		moduleGhost.elm.style.visibility="visible"
	};
	D.onDrag=function(R,O,T,S){
		if(G(R,O,T,S)===false){return }
		App.clearSelection();
		var P=App.scrollPos();
		if(!App.staticUniverse){
			var Q=(S+P)<App.tabBottom;
			if(Q){
				Element.addClassName(this,"transparent");
				if(moduleGhost.elm.parentNode){Element.remove(moduleGhost.elm)}
				var L=App.tabList.length;
				var R,O,U=null;
				for(var M=0;M<L;M++){
					R=findPosX(App.tabList[M].elm);
					O=findPosY(App.tabList[M].elm);
					if(R<=T&&T<=R+App.tabList[M].elm.offsetWidth&&O<=(S+P)&&(S+P)<=O+App.tabList[M].elm.offsetHeight){U=App.tabList[M];break}
				}
				if(App.tabDrag){if(U&&U!=App.tabDrag){Element.removeClassName(App.tabDrag.elm,"dndTarget")}}
				if(U){
					Element.addClassName(U.elm,"dndTarget");
					if(!App.tabDrag||U!=App.tabDrag){
						window.clearTimeout(App.timerTabSwitch);
						App.timerTabSwitch=window.setTimeout(function(){if(App.tabDrag){App.tabDrag.switchTo()}},1000)
					}
					App.tabDrag=U
				}
				return 
			}else{
				if(App.tabDrag){
					window.clearTimeout(App.timerTabSwitch);Element.removeClassName(App.tabDrag.elm,"dndTarget");App.tabDrag=null
				}else{Element.removeClassName(this,"transparent")}
			}
			if((R+this.offsetWidth/2)>=this.col1X){E=App.ColManager.col1}
			if(App.userCustom.numCol>=2){if((R+this.offsetWidth/2)>=this.col2X){E=App.ColManager.col2}}
			if(App.userCustom.numCol>=3){if((R+this.offsetWidth/2)>=this.col3X){E=App.ColManager.col3}}
			if(App.userCustom.numCol>=4){if((R+this.offsetWidth/2)>=this.col4X){E=App.ColManager.col4}}
			if(!moduleGhost.elm.parentNode&&moduleGhost.col){moduleGhost.col.appendChild(moduleGhost.elm)}
			if(!E){return }
			moduleGhost.elm.style.display="block";
			if(moduleGhost.col!=E){Element.remove(moduleGhost.elm);moduleGhost.col=E;E.appendChild(moduleGhost.elm);C=[]}
			if(C.length==0){C=J(E)}
			var N=B(C,O);
			if(N!=0&&O<=findPosY(C[N-1])){
				Element.remove(moduleGhost.elm);E.insertBefore(moduleGhost.elm,C[N-1]);C=[]
			}else{
				if(N!=(C.length-1)&&O>=findPosY(C[N+1])){
					if(C[N+2]){E.insertBefore(moduleGhost.elm,C[N+2])}else{E.appendChild(moduleGhost.elm)}
					C=[]
				}
			}
		}
	};
	D.onDragEnd=function(L,P,N){
		C=[];
		Element.removeClassName(this,"transparent");
		Element.removeClassName(this,"beingDragged");
		if(moduleGhost.elm.style.display=="block"||App.tabDrag){
			var M;
			if(App.tabDrag){
				M=App.tabDrag.dataObj.id;
				moduleGhost.elm.style.display="block";
				moduleGhost.col=App.ColManager.col2;
				if(moduleGhost.col.hasChildNodes()){
					moduleGhost.col.insertBefore(moduleGhost.elm,moduleGhost.col.firstChild)
				}else{moduleGhost.col.appendChild(moduleGhost.elm)}
			}else{M=App.selectedTab}
			if(I(L,P,N,M)===false){return }
			if(moduleGhost.elm&&moduleGhost.elm.parentNode){Element.remove(moduleGhost.elm)}
		}else{var O=$("navItemDrag");if(O){Element.remove(O)}}
		if(App.tabDrag){Element.removeClassName(App.tabDrag.elm,"dndTarget")}
		if(moduleGhost.elm.style.display=="none"){Element.remove(D)}
		App.tabDrag=null;
		this.isDragging=false;
		App.draggingItem=false;
		if(moduleGhost.elm.parentNode){Element.remove(moduleGhost.elm)}
	};
	if(K){D.onDragStart.apply(D)}
};
App.FlashSupport={
	pluginType:null,
	fv:[0,0],
	init:function(){
		if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){
			App.FlashSupport.pluginType="npapi";var A=navigator.plugins["Shockwave Flash"].description;if(typeof A!="undefined"){A=A.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var B=parseInt(A.replace(/^(.*)\..*$/,"$1"),10);var E=/r/.test(A)?parseInt(A.replace(/^.*r(.*)$/,"$1"),10):0;App.FlashSupport.fv=[B,E]}
		}else{
			if(window.ActiveXObject){
				App.FlashSupport.pluginType="ax";
				try{var C=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(D){
					try{var C=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");App.FlashSupport.fv=[6,0];C.AllowScriptAccess="always"}catch(D){if(App.FlashSupport.fv[0]==6){return }}try{var C=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(D){}
				}
				if(typeof C=="object"){
					var A=C.GetVariable("$version");
					if(typeof A!="undefined"){
						A=A.replace(/^\S+\s+(.*)$/,"$1").split(",");App.FlashSupport.fv=[parseInt(A[0],10),parseInt(A[2],10)]
					}
				}
			}
		}
	}
};

window.addEvent("domready",App.FlashSupport.init);

function findPosX(A){if(!A){return 0}var B=Position.cumulativeOffset(A);return B[0]}
function findPosY(A){if(!A){return 0}var B=Position.cumulativeOffset(A);return B[1]}
var moduleGhost={elm:document.createElement("div")};
moduleGhost.elm.id="moduleGhost";
App.showHideState={};
App.hide=function(){
	if($("sbox-window")){$("sbox-window").hide()}if($("sbox-overlay")){$("sbox-overlay").hide()}if($("nv-overlay")){$("nv-overlay").hide()}App.keyboardFocus="edit";if($("startMsg").style.display!="none"){App.showHideState.start=1;$("startMsg").style.display="none"}["shareModuleBalloon","modulePopupMenu","minitabsOptions","genericBalloon","pickupZone"].each(function(A){A=$(A);if(A){Element.hide(A)}});App.showHideState.app=1;$("application").style.display="none";$("top").style.display="none";App.Panel.close()};
App.show=function(){
	App.keyboardFocus="module";$("siteInformation").style.display="none";if(App.showHideState.start){$("startMsg").style.display="block"}if(App.showHideState.app){if(!App.inSubscribePreview){$("application").style.display="block"}$("top").style.display="block"}App.showHideState={};if($("sbox-window")){$("sbox-window").show()}if($("sbox-overlay")){$("sbox-overlay").show()}if($("nv-overlay")){$("nv-overlay").show()}};
App.displaySiteInformation=function(C,B){
	function D(F,E){
		E.lastChild.innerHTML=F.responseText;if(B.id=="footerLink_feedback"){App.applyFeedbackEvents(E.lastChild)}
	}
	if(Browser.isMozilla){setTimeout(App.hide,1)}else{App.hide()}
	App.setBackButton();
	var A=$("siteInformation");A.style.display="block";
	A.innerHTML='<div style="margin-bottom:20px;text-align:center"><a id="backToPage" href="javascript:App.show()">« '+_("Back to my page")+'</a></div><div id="siteInformationFrame">'+_("Loading ...")+"</div>";
	App.Request.sendGET(C,D,A)
};


////F-feed url;E-回调函数:App.Panel.AddContent.onFeedResponse=function(E,H,C);E-feed content,H-url;C-type
App.addNewFeed=function(F,E,D){
	var C;F=F.trim();
	if(D=="module"){
		return E("",F,D)
	}
	function A(G){
		if(G){var H=G.responseText.split(",")}else{var H=[]}
		if(User.feedsId==null){User.feedsId=H[1]}
		E(C,F,H[0]);
		delete E;delete C
	}
	function B(G){
		var H=G.responseText.substr(0,1024);
		if(typeof D!="undefined"&&D!="rss"&&D!="feed"){
			return E(G,F,D)
		}else{
			if(H.indexOf("www.netvibes.com/api/")!=-1){return E(G,F,"api")}else{
				if(H.indexOf("www.netvibes.com/ns/")!=-1){
					return E(G,F,"uwa")
				}else{
					if(H.indexOf("nvFeed")!=-1){}else{
						////返回以<html 开头的表示输入的是网站URL,交由 App.Panel.AddContent.onFeedResponse,C='site'处理,不再往下请求addNewFeed.php
						if(H.toLowerCase().indexOf("<html")!=-1){
							return E(G,F,"site")
						}else{
							if(H.indexOf("BEGIN")!=-1){
								return E(G,F,"webcal")
							}else{
								if(G.status==401||G.statusText.toLowerCase()=="unauthorized"){
									return E(G,F,"auth")
								}else{if(G.responseText==""){return E(G,F)}}
							}
						}
					}
				}
			}
		}
		C=G;var J=new Feed(G);
		if(typeof J.error=="undefined"||!J.error){
			var I="userFeedsId="+User.feedsId+"&title="+encodeURIComponent(J.title)+"&xmlUrl="+encodeURIComponent(F)+"&htmlUrl="+encodeURIComponent(J.htmlUrl)+"&description="+encodeURIComponent(J.description);
			if(App.visit&&App.visit.id){I+="&visit="+App.visit.id}
			////接着执行POST http://www.netvibes.com/addNewFeed.php (2687ms)
			App.Request.sendPOST(NV_PATH+"addNewFeed.php",I,A)
			////返回feed地址对应数据库里面的ID
			////执行‘添加feed’和单击图片‘单击此处可以添加**到你的页面’一样,都执行了这个过程
		}else{A(null)}
	}
	////首先执行GET http://www.netvibes.com/proxy/feedProxy.php?url=http%3A//ajaxian.com/index.xml&test=1 (921ms)
	App.Request.sendGET(feedProxyURL+escape(F)+"&test=1",B)
	////得到整个feed的内容
};
App.getFaviconUrl=function(A){if(!A){return""}return App.getStaticUrl(NV_PATH+"proxy/favIcon.php?url="+encodeURIComponent(A))};
App.getAvatarUrl=function(A){
	if(!A){return""}
	return App.getStaticUrl(NV_PATH+"proxy/avatar.php?username="+encodeURIComponent(A))
};
App.addIframes=function(){
	var A=$("iframes");
	var B=document.createElement("iframe");
	B.src=NV_STATIC+NV_PATH+"empty.txt";
	B.id="sessionFrame";B.style.width="1px";B.style.height="1px";B.style.border=0;B.style.visibility="hidden";
	A.appendChild(B);
	var D=document.createElement("iframe");
	D.src=NV_STATIC+NV_PATH+"empty.txt";
	D.id="upload_target";D.name="upload_target";D.style.width="1px";D.style.height="1px";D.style.border=0;D.style.visibility="hidden";
	A.appendChild(D);
	if(D.contentWindow){D.contentWindow.name="upload_target"}
	var C=document.createElement("iframe");
	C.src=NV_STATIC+NV_PATH+"empty.txt";
	C.id="commFrame";C.style.width="1px";C.style.height="1px";C.style.border=0;C.style.visibility="hidden";
	A.appendChild(C)
};
App.setBackButton=function(){try{var A=$("sessionFrame");var C=A.contentDocument;if(typeof C=="undefined"){if(typeof A=="undefined"||typeof A.contentWindow=="undefined"||typeof A.contentWindow.document=="undefined"){return false}C=A.contentWindow.document}C.open();C.write("<html><body></body></html>");C.close()}catch(B){return false}};
App.swapLang=function(A){location.href=NV_PATH+"?lang="+A};
App.applyFeedbackEvents=function(F){
	var E=F.getElementsByTagName("form")[0];
	var A=E.getElementsByTagName("textarea")[0];
	var C=A.value;
	A.onfocus=function(H){if(A.value==C){A.value=""}};
	A.onblur=function(H){if(A.value==""){A.value=C}};
	if(typeof User.email!="undefined"){E.getElementsByTagName("input")[1].value=User.email}
	document.getElementById("feedbackButtons").innerHTML='<input id="feedbackTimezone" type="hidden" name="timezone" value="unknown" /><input id="feedbackSend" type="submit" value="Send the feedback" class="buttonClean" />';
	document.getElementById("feedbackTimezone").value=(new Date()).getTimezoneOffset();
	if(App.lang=="fr_FR"){document.getElementById("feedbackSend").value="Envoyer"}
	var D=F.getElementsByTagName("select")[0];
	var G=document.getElementById("feedbackSubject").selectedIndex;
	D.onchange=function(){
		var H=document.getElementById("feedbackSubject").selectedIndex;
		var I;
		I=document.getElementById("feedbackHelp"+G);
		if(I){I.style.display="none"}
		I=document.getElementById("feedbackHelp"+H);
		if(I){I.style.display="block"}
		G=H
	};
	D.onchange();
	document.getElementById("feedbackTable").style.display="block";
	function B(H){
		switch(H.responseText){
			case"success":
				document.getElementById("feedbackSendStatus").innerHTML="Your feedback has been sent, thank you!";
				document.getElementById("feedbackFeedback").value="";
				document.getElementById("feedbackSubject").selectedIndex=0;
				document.getElementById("feedbackSend").disabled=false;
				break;
			default:
				document.getElementById("feedbackSendStatus").innerHTML='An error has occured while sending feedback, <a href="mailto:feedback@netvibes.com">please click here</a>!';
				document.getElementById("feedbackSend").disabled=false;
			break
		}
	}
	
	E.onsubmit=function(){
		var H=document.getElementById("feedbackName");
		var L=document.getElementById("feedbackMail");
		var N=document.getElementById("feedbackSubject");
		var I=document.getElementById("feedbackFeedback");
		var J=document.getElementById("feedbackSendStatus");
		var M=document.getElementById("feedbackTimezone");
		var O=document.getElementById("feedbackSend");
		if(H.value!=""&&L.value!=""&&N.value!=""&&I.value!=""&&I.value!="Your feedback here"&&String.isEmail(L.value)){
			var K="name="+encodeURIComponent(H.value)+"&mail="+encodeURIComponent(L.value)+"&subject="+encodeURIComponent(N.value)+"&feedback="+encodeURIComponent(I.value)+"&timezone="+encodeURIComponent(M.value)+"&js_app=1";
			O.disabled=true;
			J.innerHTML="Sending feedback...";
			if(App.visit&&App.visit.id){K+="&visit="+App.visit.id}
			App.Request.sendPOST(NV_PATH+"feedback.php?nocache="+Math.random(),K,B)
		}else{
			if(H.value.trim()==""){P(H,_("Please enter your name"))}else{if(L.value.trim()==""||!String.isEmail(L.value)){P(L,_("Please enter a valid email"))}}
		}
			
		function P(S,R){
			var Q=new Element("div",{"class":"balloon",styles:{"margin-left":"-10px",filter:"progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135,strength=4)"}});
			new Element("div",{"class":"content"}).appendText(R).inject(Q);
			S.style.display="block";
			Q.inject(S.parentNode);
			if(Browser.isIE){N.style.visibility="hidden"}
			$(S).addEvent("focus",function(){Q.hide();if(Browser.isIE){N.style.visibility="visible"}})
		}
		return false
	}
};
App.saveUserCustomTimeout=null;
App.saveUserCustom=function(){
	if(App.staticUniverse){return false}if(App.saveUserCustomTimeout){clearTimeout(App.saveUserCustomTimeout)}App.saveUserCustomTimeout=setTimeout(App.saveUserCustomNow,1000)};
App.saveUserCustomNow=function(){
	if(App.staticUniverse){return false}var A="";for(var C in App.userCustom){if(typeof App.userCustom.hasOwnProperty!="string"&&!App.userCustom.hasOwnProperty(C)){continue}var B=App.userCustom[C];if(typeof B!="number"&&typeof B!="string"){B=JSON.encode(B)}A+="&arrData["+C+"]="+encodeURIComponent(B)}if(App.visit&&App.visit.id){A+="&visit="+App.visit.id}App.Request.sendPOST(NV_PATH+"ajax/save/userCustom.php","mode=custom"+A)};

App.insertCssFile=function(B){
	var E=document.getElementsByTagName("head")[0];if(!E){return false}var A=E.getElementsByTagName("link");for(var D=0;D<A.length;D++){if(A[D].getAttribute("type")=="text/css"&&A[D].getAttribute("href")==B){return false}}var C=document.createElement("link");C.setAttribute("type","text/css");C.setAttribute("rel","stylesheet");C.setAttribute("href",B);E.appendChild(C);return C};

App.scrollPos=function(){var A;if(self.pageYOffset){A=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){A=document.documentElement.scrollTop}else{if(document.body){A=document.body.scrollTop}else{A=0}}}return A};

var icons_png="img/icons.png?v=8796";
var tabicons_png="img/tabicons.png?v=8796";
App.iconMapping={
	"img/aol.gif":[icons_png,2,2],"img/arrowList.gif":[icons_png,20,2],"img/blogmarksnet.png":[icons_png,38,2],"img/blogsearch.png":[icons_png,56,2],"img/bookmark.gif":[icons_png,74,2],"img/boxnet.png":[icons_png,92,2],"img/cart.gif":[icons_png,110,2],"img/clear.gif":[icons_png,128,2],"img/closeMod.gif":[icons_png,146,2],"img/closeTab.gif":[icons_png,164,2],"img/delicious.gif":[icons_png,2,20],"img/digg.gif":[icons_png,20,20],"img/ebay.gif":[icons_png,38,20],"img/eco.png":[icons_png,56,20],"img/edit.gif":[icons_png,74,20],"img/flickr.png":[icons_png,92,20],"img/foxsports.png":[icons_png,110,20],"img/gmail.gif":[icons_png,128,20],"img/hideMod.gif":[icons_png,146,20],"img/hideModBlue.gif":[icons_png,164,20],"img/ical.gif":[icons_png,2,38],"img/icons/new.gif":[icons_png,20,38],"img/icons/world.gif":[icons_png,38,38],"img/info.gif":[icons_png,56,38],"img/kelkoo.gif":[icons_png,74,38],"img/meebo.png":[icons_png,92,38],"img/note.gif":[icons_png,110,38],"img/next.gif":[icons_png,128,38],"img/previous.gif":[icons_png,146,38],"img/popmail.gif":[icons_png,164,38],"img/publish.png":[icons_png,2,56],"img/refresh.gif":[icons_png,20,56],"img/search.gif":[icons_png,38,56],"img/showMod.gif":[icons_png,56,56],"img/showModBlue.gif":[icons_png,74,56],"img/signin.gif":[icons_png,92,56],"img/signout.gif":[icons_png,110,56],"img/speaker.gif":[icons_png,128,56],"img/tabOptions.gif":[icons_png,146,56],"img/todolist.gif":[icons_png,164,56],"img/uwa.png":[icons_png,2,74],"img/video-player.gif":[icons_png,20,74],"img/wand.png":[icons_png,38,74],"img/weather.gif":[icons_png,56,74],"img/writely.gif":[icons_png,74,74],"img/yahoomail.gif":[icons_png,92,74],"modules/aolMail/img/aol.png":[icons_png,110,74],"modules/alexa/img/favicon.png":[icons_png,128,74],"modules/craigslist/favicon.png":[icons_png,146,74],"modules/externalWidget/img/icon-api.gif":[icons_png,164,74],"modules/hotmail/img/hotmail.png":[icons_png,2,92],"modules/imagesSearch/favicon.png":[icons_png,20,92],"modules/macMail/icone_mac.png":[icons_png,38,92],"modules/myspace/icon-myspace.gif":[icons_png,56,92],"modules/twitter/twitter.ico":[icons_png,74,92],"modules/zoho/zoho.ico":[icons_png,92,92],"img/eco.png":[tabicons_png,1,2],"img/favicon.png":[tabicons_png,19,2],"img/icons/anchor.gif":[tabicons_png,37,2],"img/icons/attach.gif":[tabicons_png,55,2],"img/icons/basket.gif":[tabicons_png,73,2],"img/icons/bomb.gif":[tabicons_png,91,2],"img/icons/book.gif":[tabicons_png,109,2],"img/icons/book_addresses.gif":[tabicons_png,127,2],"img/icons/book_open.gif":[tabicons_png,145,2],"img/icons/brick.gif":[tabicons_png,163,2],"img/icons/briefcase.gif":[tabicons_png,181,2],"img/icons/bug.gif":[tabicons_png,199,2],"img/icons/cake.gif":[tabicons_png,217,2],"img/icons/calendar_view_day.gif":[tabicons_png,235,2],"img/icons/calendar_view_month.gif":[tabicons_png,1,20],"img/icons/camera.gif":[tabicons_png,19,20],"img/icons/car.gif":[tabicons_png,37,20],"img/icons/cd.gif":[tabicons_png,55,20],"img/icons/chart_bar.gif":[tabicons_png,73,20],"img/icons/chart_curve.gif":[tabicons_png,91,20],"img/icons/chart_organisation.gif":[tabicons_png,109,20],"img/icons/chart_pie.gif":[tabicons_png,127,20],"img/icons/clock.gif":[tabicons_png,145,20],"img/icons/clock_red.gif":[tabicons_png,163,20],"img/icons/cog.gif":[tabicons_png,181,20],"img/icons/coins.gif":[tabicons_png,199,20],"img/icons/color_swatch.gif":[tabicons_png,217,20],"img/icons/comment.gif":[tabicons_png,235,20],"img/icons/computer.gif":[tabicons_png,1,38],"img/icons/connect.gif":[tabicons_png,19,38],"img/icons/creditcards.gif":[tabicons_png,37,38],"img/icons/door.gif":[tabicons_png,55,38],"img/icons/door_open.gif":[tabicons_png,73,38],"img/icons/drink.gif":[tabicons_png,91,38],"img/icons/drink_empty.gif":[tabicons_png,109,38],"img/icons/email.gif":[tabicons_png,127,38],"img/icons/email_open.gif":[tabicons_png,145,38],"img/icons/email_open_image.gif":[tabicons_png,163,38],"img/icons/emoticon_evilgrin.gif":[tabicons_png,181,38],"img/icons/emoticon_grin.gif":[tabicons_png,199,38],"img/icons/emoticon_happy.gif":[tabicons_png,217,38],"img/icons/emoticon_smile.gif":[tabicons_png,235,38],"img/icons/emoticon_surprised.gif":[tabicons_png,1,56],"img/icons/emoticon_tongue.gif":[tabicons_png,19,56],"img/icons/emoticon_unhappy.gif":[tabicons_png,37,56],"img/icons/emoticon_waii.gif":[tabicons_png,55,56],"img/icons/emoticon_wink.gif":[tabicons_png,73,56],"img/icons/exclamation.gif":[tabicons_png,91,56],"img/icons/eye.gif":[tabicons_png,109,56],"img/icons/feed.gif":[tabicons_png,127,56],"img/icons/flag_blue.gif":[tabicons_png,145,56],"img/icons/flag_green.gif":[tabicons_png,163,56],"img/icons/flag_orange.gif":[tabicons_png,181,56],"img/icons/flag_pink.gif":[tabicons_png,199,56],"img/icons/flag_purple.gif":[tabicons_png,217,56],"img/icons/flag_red.gif":[tabicons_png,235,56],"img/icons/flag_yellow.gif":[tabicons_png,1,74],"img/icons/folder.gif":[tabicons_png,19,74],"img/icons/heart.gif":[tabicons_png,37,74],"img/icons/house.gif":[tabicons_png,55,74],"img/icons/image.gif":[tabicons_png,73,74],"img/icons/information.gif":[tabicons_png,91,74],"img/icons/ipod.gif":[tabicons_png,109,74],"img/icons/keyboard.gif":[tabicons_png,127,74],"img/icons/layout.gif":[tabicons_png,145,74],"img/icons/lightbulb.gif":[tabicons_png,163,74],"img/icons/lightbulb_off.gif":[tabicons_png,181,74],"img/icons/lock.gif":[tabicons_png,199,74],"img/icons/lock_open.gif":[tabicons_png,217,74],"img/icons/lorry.gif":[tabicons_png,235,74],"img/icons/lorry_flatbed.gif":[tabicons_png,1,92],"img/icons/magnifier.gif":[tabicons_png,19,92],"img/icons/money.gif":[tabicons_png,37,92],"img/icons/money_dollar.gif":[tabicons_png,55,92],"img/icons/money_euro.gif":[tabicons_png,73,92],"img/icons/money_pound.gif":[tabicons_png,91,92],"img/icons/money_yen.gif":[tabicons_png,109,92],"img/icons/monitor.gif":[tabicons_png,127,92],"img/icons/mouse.gif":[tabicons_png,145,92],"img/icons/music.gif":[tabicons_png,163,92],"img/icons/new.gif":[tabicons_png,181,92],"img/icons/note.gif":[tabicons_png,199,92],"img/icons/page.gif":[tabicons_png,217,92],"img/icons/page_copy.gif":[tabicons_png,235,92],"img/icons/page_white.gif":[tabicons_png,1,110],"img/icons/page_white_acrobat.gif":[tabicons_png,19,110],"img/icons/page_white_code.gif":[tabicons_png,37,110],"img/icons/page_white_compressed.gif":[tabicons_png,55,110],"img/icons/page_white_excel.gif":[tabicons_png,73,110],"img/icons/page_white_flash.gif":[tabicons_png,91,110],"img/icons/page_white_php.gif":[tabicons_png,109,110],"img/icons/page_white_picture.gif":[tabicons_png,127,110],"img/icons/page_white_powerpoint.gif":[tabicons_png,145,110],"img/icons/page_white_text.gif":[tabicons_png,163,110],"img/icons/page_white_word.gif":[tabicons_png,181,110],"img/icons/page_white_world.gif":[tabicons_png,199,110],"img/icons/palette.gif":[tabicons_png,217,110],"img/icons/paste_plain.gif":[tabicons_png,235,110],"img/icons/pencil.gif":[tabicons_png,1,128],"img/icons/phone.gif":[tabicons_png,19,128],"img/icons/photo.gif":[tabicons_png,37,128],"img/icons/picture.gif":[tabicons_png,55,128],"img/icons/printer.gif":[tabicons_png,73,128],"img/icons/printer_empty.gif":[tabicons_png,91,128],"img/icons/rainbow.gif":[tabicons_png,109,128],"img/icons/rosette.gif":[tabicons_png,127,128],"img/icons/server.gif":[tabicons_png,145,128],"img/icons/shield.gif":[tabicons_png,163,128],"img/icons/sport_8ball.gif":[tabicons_png,181,128],"img/icons/sport_basketball.gif":[tabicons_png,199,128],"img/icons/sport_football.gif":[tabicons_png,217,128],"img/icons/sport_golf.gif":[tabicons_png,235,128],"img/icons/sport_raquet.gif":[tabicons_png,1,146],"img/icons/sport_shuttlecock.gif":[tabicons_png,19,146],"img/icons/sport_soccer.gif":[tabicons_png,37,146],"img/icons/sport_tennis.gif":[tabicons_png,55,146],"img/icons/star.gif":[tabicons_png,73,146],"img/icons/stop.gif":[tabicons_png,91,146],"img/icons/tag_blue.gif":[tabicons_png,109,146],"img/icons/tag_green.gif":[tabicons_png,127,146],"img/icons/tag_orange.gif":[tabicons_png,145,146],"img/icons/tag_pink.gif":[tabicons_png,163,146],"img/icons/tag_purple.gif":[tabicons_png,181,146],"img/icons/tag_red.gif":[tabicons_png,199,146],"img/icons/tag_yellow.gif":[tabicons_png,217,146],"img/icons/telephone.gif":[tabicons_png,235,146],"img/icons/television.gif":[tabicons_png,1,164],"img/icons/thumb_down.gif":[tabicons_png,19,164],"img/icons/thumb_up.gif":[tabicons_png,37,164],"img/icons/time.png":[tabicons_png,55,164],"img/icons/trash.gif":[tabicons_png,73,164],"img/icons/tux.gif":[tabicons_png,91,164],"img/icons/user.gif":[tabicons_png,109,164],"img/icons/user_female.gif":[tabicons_png,127,164],"img/icons/user_gray.gif":[tabicons_png,145,164],"img/icons/user_green.gif":[tabicons_png,163,164],"img/icons/user_orange.gif":[tabicons_png,181,164],"img/icons/user_red.gif":[tabicons_png,199,164],"img/icons/user_suit.gif":[tabicons_png,217,164],"img/icons/vcard.gif":[tabicons_png,235,164],"img/icons/weather_clouds.gif":[tabicons_png,1,182],"img/icons/weather_cloudy.gif":[tabicons_png,19,182],"img/icons/weather_lightning.gif":[tabicons_png,37,182],"img/icons/weather_rain.gif":[tabicons_png,55,182],"img/icons/weather_snow.gif":[tabicons_png,73,182],"img/icons/weather_sun.gif":[tabicons_png,91,182],"img/icons/world.gif":[tabicons_png,109,182],"img/icons/zoom.gif":[tabicons_png,127,182],"img/uwa.png":[tabicons_png,145,182]};
App.iconMapper=function(A){
	if(typeof A=="undefined"){return false}if(A.substr(0,NV_STATIC.length)==NV_STATIC){A=A.substr(NV_STATIC.length)}if(A.substr(0,NV_PATH.length)==NV_PATH){A=A.substr(NV_PATH.length)}A=A.replace(/^http:\/\/.*\.?netvibes\.(com|local)\//,"");if(typeof App.iconMapping[A]!="undefined"){return App.iconMapping[A]}return false};
App.notifyModuleThemeUpdated=function(D){
	for(var B=0,C=App.moduleList.length;B<C;B++){var A=App.moduleList[B];if(A.dataObj&&A.content&&typeof A.content.updateTheme=="function"){A.content.updateTheme(D)}}};
App.historyManager=function(){
	if(App.lastAnchor==document.location.hash){return }if(App.FeedReader.isOpen){document.location.hash=App.lastAnchor;App.FeedReader.close();return }App.lastAnchor=document.location.hash;var A=document.location.hash.substr(1);if(A==""){return false}if(A==App.selectedTab||A==String.toAnchor(App.selectedTabObj.dataObj.title)){return }var C=App.tabList.length;for(var B=0;B<C;B++){if(A==App.tabList[B].dataObj.id||A==String.toAnchor(App.tabList[B].dataObj.title)){if(App.tabList[B].dataObj.id==App.selectedTab){return }App.tabList[B].switchTo()}}};
App.lastAnchor=document.location.hash;
if(!(Browser.isSafari&&Browser.version<3)){window.setInterval(App.historyManager,200)}
onresizeTimeout=null;
window.onresize=function(){
	if(App.ColManager&&App.ColManager.drag){return }if(onresizeTimeout){clearTimeout(onresizeTimeout)}onresizeTimeout=setTimeout(function(){if(App.FeedReader){App.FeedReader.resize()}if(App.ColManager){App.ColManager.updateLayout(true)}App.checkSmallDisplay()},200)
};
App.checkSmallDisplay=function(){
	if(typeof window.getSize=="function"){$(document.body)[window.getSize().x<=800?"addClass":"removeClass"]("smalldisplay")}
};
window.onunload=function(){
	try{var C=App.moduleList.length;for(var E=0;E<C;E++){try{if(typeof App.moduleList[E].content.unload=="function"){App.moduleList[E].content.unload()}if(typeof App.moduleList[E].unload=="function"){App.moduleList[E].unload()}App.moduleList[E].data=null;App.moduleList[E].content=null;App.moduleList[E].self=null;delete App.moduleList[E];App.moduleList[E]=null}catch(D){}}delete App.moduleList;App.moduleList=null;for(var E=1;E<=4;E++){var A=App.ColManager["col"+E];var C=A.childNodes.length;for(var B=0;B<C;B++){delete A.childNodes[B].dataObj}}delete App.ColManager;delete App.Modules;App.Modules=null;var C=App.tabList.length;for(var E=0;E<C;E++){try{if(typeof App.tabList[E].unload=="function"){App.tabList[E].unload()}App.tabList[E].data=null;App.tabList[E].self=null;delete App.tabList[E];App.tabList[E]=null}catch(D){}}delete App.tabList;App.tabList=null;delete App.selectedTabObj;App.selectedTabObj=null;delete App.userCustom;App.userCustom=null;delete App.FeedReader;App.FeedReader=null;delete App.keyboardHandler;App.keyboardHandler=null;delete tabOptions;if(App.enableStats){App.checkServerVersion(true)}delete App;App=null}catch(D){}
};;

//8
App.Modules=new Object();

App.universeModuleList=[
	"Alexa","Aol","BlogSearch","CraigsList","Digg","EncyclopediaSearch","externalWidget","Flash","Finance","Flickr","FoxSportsVideo","FriendActivities","Ical","ImageModule","ImagesSearch","LinkModule","MailWizard","MapsSearch","MultipleFeeds","Myspace","PodcastSearch","PostIt","PriceWatch","RssReader","ShoppingSearch","TodoList","Twitter","UniverseAIM","UniverseDailymotion","UniverseFacebook","UniverseGTalk","UniverseICQ","UniverseLastFM","UniverseLiveMessenger","UniversePicasa","UniverseSkype","UniverseTwitter","UniverseYahooMessenger","UniverseYoutube","UniverseQQ","UWA","Vibes","Video","Wall","Weather","WebPage","WebSearch","MeeboRooms"];
App.Modules.RssReaderInfos={
	infos:_("Click here to add your own RSS/ATOM feeds, just enter your feed URL or import an OPML file"),defaultObj:{status:1,share:0,title:"",moduleName:"RssReader",data:{}},type:"uwa",path:NV_PATH+"modules/feedReader/feedReader.html?v=1000",richIcon:App.getStaticUrl(NV_PATH+"modules/feedReader/richicon.png?v=1000")};
App.Modules.WeatherInfos={
	title:_("Weather"),infos:_("Displays today's weather info and the forecast for the next 3 days of a specific town"),defaultObj:{status:1,share:0,title:_("Weather"),moduleName:"Weather",data:{}},path:NV_PATH+"modules/weather/weather.js?v=9328",ico:App.getStaticUrl(NV_PATH+"img/weather.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/weather/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/weather/m-weather.css?v=8878")};
App.Modules.PostItInfos={
	title:_("Webnote"),infos:_("This is pretty self explicit, it lets you add some notes on your page"),defaultObj:{status:1,share:0,title:_("Webnote"),moduleName:"PostIt",data:{color:"yellow"}},path:NV_PATH+"modules/postIt/postIt.js?v=9981",ico:App.getStaticUrl(NV_PATH+"img/note.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/postIt/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/postIt/m-webnote.css?v=6311")};
App.Modules.TodoListInfos={
	title:_("To Do List"),infos:_("Add items you have to do in a neat list, check'em when it's done."),defaultObj:{status:1,share:0,title:_("To Do List"),moduleName:"TodoList",data:{}},type:"uwa",path:NV_PATH+"modules/todolist/todolist.html?v=1001",ico:App.getStaticUrl(NV_PATH+"img/todolist.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/todolist/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/todolist/m-todolist.css?v=1501")};
App.Modules.IcalInfos={
	title:_("Calendar"),infos:_("Allows you to keep track of the latest events of an online iCalendar"),defaultObj:{status:1,share:0,title:_("Calendar"),moduleName:"Ical",data:{}},path:NV_PATH+"modules/ical/ical.js?v=10084",ico:App.getStaticUrl(NV_PATH+"img/ical.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/ical/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/ical/m-ical.css?v=1500")};
App.Modules.BookmarksInfos={
	title:_("Bookmarks"),infos:_("Keep your best bookmarks visible on your page with that module"),defaultObj:{status:1,share:0,title:_("Bookmarks"),moduleName:"Bookmarks",data:{}},path:NV_PATH+"modules/bookmarks/bookmarks.js?v=10085",ico:App.getStaticUrl(NV_PATH+"img/bookmark.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/bookmarks/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/bookmarks/m-bookmark.css?v=6237")};
App.Modules.LinkModuleInfos={
	title:_("Link widget"),infos:"INFOS TODO !!!",defaultObj:{status:1,share:0,title:_("Link widget"),moduleName:"LinkModule",data:{}},path:NV_PATH+"modules/universe/linkModule/link.js?v=1000",richIcon:App.getStaticUrl(NV_PATH+"modules/universe/linkModule/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"modules/universe/linkModule/favicon.png?v=1000")};
App.Modules.FriendActivitiesInfos={
	title:_("My community"),infos:_("Displays your contacts activities, friends and followers"),defaultObj:{status:1,share:0,title:_("My community"),moduleName:"FriendActivities",data:{selfMode:true,fixedUserId:true}},type:"uwa",path:NV_PATH+"modules/friendActivities/friendActivities.html?v=1006",ico:App.getStaticUrl(NV_PATH+"favicon.ico?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/friendActivities/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/friendActivities/m-friendActivities.css?v=1002")};
App.Modules.MailWizardInfos={
	title:_("E-mail wizard"),infos:_("Set up an e-mail account easily"),defaultObj:{status:1,share:0,title:_("E-mail wizard"),moduleName:"MailWizard",data:{}},path:NV_PATH+"modules/mailWizard/mailWizard.js?v=9610",richIcon:App.getStaticUrl(NV_PATH+"modules/mailWizard/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"img/wand.png?v=1000")};
App.Modules.SocialWizardInfos={
	title:_("Social Network Wizard"),infos:_("Setup your social network easily"),defaultObj:{status:1,share:0,title:_("Social Network Wizard"),moduleName:"SocialWizard",data:{}},type:"uwa",path:NV_PATH+"modules/socialWizard/socialWizard.html?v=1001",richIcon:App.getStaticUrl(NV_PATH+"modules/socialWizard/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/socialWizard/m-socialWizard.css?v=1001"),ico:App.getStaticUrl(NV_PATH+"img/wand.png?v=1000")};
App.Modules.PopMailInfos={
	title:_("Mail"),infos:_("Displays the latest messages of your POP3 / IMAP4 inbox"),defaultObj:{status:1,share:0,title:_("PopMail"),moduleName:"PopMail",data:{}},path:NV_PATH+"modules/popmail/popmail.js?v=6971",ico:App.getStaticUrl(NV_PATH+"img/popmail.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/popmail/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/popmail/m-email.css?v=7780")};
App.Modules.YahooMailInfos={
	title:_("Yahoo! Mail"),infos:_("Displays the latest messages of your POP3 enabled Yahoo! Mail account"),defaultObj:{status:1,share:0,title:_("Yahoo! Mail"),moduleName:"YahooMail",data:{}},path:NV_PATH+"modules/yahoomail/yahoomail.js?v=8100",ico:App.getStaticUrl(NV_PATH+"img/yahoomail.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/yahoomail/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/popmail/m-email.css?v=7780")};
App.Modules.YahooMailV2Infos={
	title:_("Yahoo! Mail"),infos:_("Displays the latest messages of your Yahoo! Mail account"),defaultObj:{status:1,share:0,title:_("Yahoo! Mail"),moduleName:"YahooMailV2",data:{}},path:NV_PATH+"modules/yahooMailV2/yahooMailV2.js?v=8265",richIcon:App.getStaticUrl(NV_PATH+"modules/yahooMailV2/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"img/yahoomail.gif?v=1000")};
App.Modules.GmailInfos={
	title:_("Gmail"),
	infos:_("Displays the last unread messages of your Gmail inbox"),
	defaultObj:{status:1,share:0,title:_("Gmail"),moduleName:"Gmail",data:{}},
	path:NV_PATH+"modules/gmail/gmail.js?v=8878",
	ico:App.getStaticUrl(NV_PATH+"img/gmail.gif?v=1000"),
	richIcon:App.getStaticUrl(NV_PATH+"modules/gmail/richicon.png?v=1000"),
	css:App.getStaticUrl(NV_PATH+"modules/popmail/m-email.css?v=7780")};
App.Modules.HotmailInfos={
	title:_("Hotmail"),infos:_("Displays the latest messages of your Hotmail account"),defaultObj:{status:1,share:0,title:_("Hotmail"),moduleName:"Hotmail",data:{}},path:NV_PATH+"modules/hotmail/hotmail.js?v=8749",richIcon:App.getStaticUrl(NV_PATH+"modules/hotmail/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"modules/hotmail/img/hotmail.png?v=1000")};
App.Modules.AolMailInfos={
	title:_("AOL Mail"),infos:_("Displays the latest messages of your AOL mail account"),defaultObj:{status:1,share:0,title:_("AOL mail"),moduleName:"AolMail",data:{}},path:NV_PATH+"modules/aolMail/aolMail.js?v=9066",richIcon:App.getStaticUrl(NV_PATH+"modules/aolMail/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"modules/aolMail/img/aol.png?v=1000")};
App.Modules.MacMailInfos={
	title:_(".Mac Mail"),infos:_("Displays the latest messages of your .Mac account"),defaultObj:{status:1,share:0,title:_(".Mac Mail"),moduleName:"MacMail",data:{}},path:NV_PATH+"modules/macMail/macMail.js?v=9067",richIcon:App.getStaticUrl(NV_PATH+"modules/macMail/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"modules/macMail/icone_mac.png?v=1000")};
App.Modules.MeeboInfos={
	title:_("Meebo"),infos:_("Integrating the Meebo messenger"),defaultObj:{status:1,share:0,title:_("Meebo"),moduleName:"Meebo",data:{}},path:NV_PATH+"modules/meebo/meebo.js?v=6894",richIcon:App.getStaticUrl(NV_PATH+"modules/meebo/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"img/meebo.png?v=1000")};
App.Modules.FinanceInfos={
	title:_("Finance"),infos:_("Stock quote values"),defaultObj:{status:1,share:0,title:_("Finance"),moduleName:"Finance",data:{}},type:"uwa",path:NV_PATH+"modules/finance/finance.html?v=1004",css:App.getStaticUrl(NV_PATH+"modules/finance/m-finance.css?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/finance/img/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"modules/finance/img/quotes.ico?v=1000")};
App.Modules.VibesInfos={
	title:_("Custom Search"),infos:_("UWA Vibes module"),defaultObj:{status:1,share:0,title:_("Custom Search"),moduleName:"Vibes",data:{}},type:"uwa",path:NV_PATH+"modules/vibes/vibes.html?v=9988",ico:App.getStaticUrl(NV_PATH+"img/search.gif?v=1000")};
App.Modules.MapsSearchInfos={
	title:_("Maps Search"),infos:_("Search on Google Maps, Yahoo! Maps and Live Maps"),defaultObj:{status:1,share:0,title:_("Maps Search"),moduleName:"MapsSearch",data:{}},path:NV_PATH+"modules/mapsSearch/mapsSearch.js?v=9856",richIcon:App.getStaticUrl(NV_PATH+"modules/vibes/richicon-map.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"img/icons/world.gif?v=1000")};
App.Modules.AolInfos={
	title:_("AOL Video"),infos:_("AOL latest sessions."),defaultObj:{status:1,share:0,title:_("AOL Video"),moduleName:"Aol",data:{}},type:"uwa",path:NV_PATH+"modules/aol/aol.html?v=9849",richIcon:App.getStaticUrl(NV_PATH+"modules/aol/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"img/aol.gif?v=1000")};
App.Modules.AlexaInfos={
	title:_("Alexa Traffic"),infos:_("Compare multiple domains traffic on a colorful line graph using Alexa traffic rankings"),defaultObj:{status:1,share:0,title:_("Alexa Traffic"),moduleName:"Alexa",data:{}},type:"uwa",path:NV_PATH+"modules/alexa/alexa.html?v=1000",ico:App.getStaticUrl(NV_PATH+"modules/alexa/img/favicon.png?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/alexa/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/alexa/m-alexa.css?v=3163")};
App.Modules.BoxNetInfos={
	title:_("Box.net web storage"),infos:_("A place to keep your files online"),defaultObj:{status:1,share:0,title:_("Box.net web storage"),moduleName:"BoxNet",data:{}},path:NV_PATH+"modules/boxnet/boxnet.js?v=10084",ico:App.getStaticUrl(NV_PATH+"img/boxnet.png?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/boxnet/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/boxnet/m-boxnet.css?v=2384")};
App.Modules.CraigsListInfos={
	title:_("Craigslist"),infos:_("Craigslist provides local classifieds and forums for jobs, housing, for sale, personals, services, local community, and events."),defaultObj:{status:1,share:0,title:_("Craigslist"),moduleName:"CraigsList",data:{}},path:NV_PATH+"modules/craigslist/craigslist.js?v=9001",richIcon:App.getStaticUrl(NV_PATH+"modules/craigslist/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"modules/craigslist/favicon.png?v=1000")};
App.Modules.DeliciousInfos={
	title:_("del.icio.us"),infos:_("Keep your del.icio.us bookmarks visible on your page with this module."),defaultObj:{status:1,share:0,title:_("del.icio.us"),moduleName:"Delicious",data:{}},path:NV_PATH+"modules/delicious/delicious.js?v=10084",ico:App.getStaticUrl(NV_PATH+"img/delicious.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/delicious/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/bookmarks/m-bookmark.css?v=6237")};
App.Modules.DiggInfos={
	title:_("Digg"),infos:_("Viewing selected Digg news."),defaultObj:{status:1,share:0,title:_("Digg"),moduleName:"Digg",data:{}},type:"uwa",path:NV_PATH+"modules/digg/digg.html?v=9789.2",ico:App.getStaticUrl(NV_PATH+"img/digg.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/digg/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/digg/m-digg.css?v=9789")};
App.Modules.DiggOfficialInfos={
	title:_("Digg"),infos:_("Discover the best news, images and videos as voted on by the Digg community."),defaultObj:{status:1,share:0,title:_("Digg"),moduleName:"DiggOfficial",data:{}},type:"uwa",path:NV_PATH+"modules/diggOfficial/diggOfficial.html?v=9789.2",ico:App.getStaticUrl(NV_PATH+"img/digg.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/digg/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/diggOfficial/m-diggOfficial.css?v=9789")};
App.Modules.EbayInfos={
	title:_("Ebay"),infos:_("Keep track on what's going on at your Ebay Account"),defaultObj:{status:1,share:0,title:_("Ebay"),moduleName:"Ebay",data:{}},path:NV_PATH+"modules/ebay/ebay.js?v=10085",ico:App.getStaticUrl(NV_PATH+"img/ebay.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/ebay/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/ebay/m-ebay.css?v=4893")};
App.Modules.FacebookInfos={
	title:_("Facebook"),infos:_("Keep track of your friends on Facebook."),defaultObj:{status:1,share:0,title:_("Facebook"),moduleName:"Facebook",data:{}},type:"uwa",path:NV_PATH+"modules/facebook/facebook.html?v=1000",ico:App.getStaticUrl(NV_PATH+"modules/facebook/img/facebook.ico?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/facebook/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/facebook/m-facebook.css?v=1001")};
App.Modules.FlickrInfos={
	title:_("Flickr photos"),infos:_("Put on your page the last added pictures of any public photostream or for a specific tag"),defaultObj:{status:1,share:0,title:_("Flickr photos"),moduleName:"Flickr",data:{}},path:NV_PATH+"modules/flickr/flickr.js?v=10090",ico:App.getStaticUrl(NV_PATH+"img/flickr.png?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/flickr/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/flickr/m-flickr.css?v=1500")};
App.Modules.FoxSportsVideoInfos={
	title:_("FOX Sports Video"),infos:_("Stay up to date with the latest sports video from FOXSports.com"),defaultObj:{status:1,share:0,title:_("FOX Sports Video"),moduleName:"FoxSportsVideo",data:{}},path:NV_PATH+"modules/foxsportsvideo/foxsportsvideo.js?v=6862",ico:App.getStaticUrl(NV_PATH+"img/foxsports.png?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/foxsportsvideo/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/foxsportsvideo/m-fox.css?v=1500")};
App.Modules.MyspaceInfos={
	title:_("MySpace"),infos:_("Keep track of your friends at MySpace."),defaultObj:{status:1,share:0,title:("MySpace"),moduleName:"Myspace",data:{}},type:"uwa",path:NV_PATH+"modules/myspace/myspace.html?v=1005",richIcon:App.getStaticUrl(NV_PATH+"modules/myspace/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"modules/myspace/icon-myspace.gif?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/myspace/m-myspace.css?v=1001")};
App.Modules.TwitterInfos={
	title:_("Twitter"),infos:_("Post status to Twitter and read status from your friends."),defaultObj:{status:1,share:0,title:_("Twitter"),moduleName:"Twitter",data:{}},type:"uwa",path:NV_PATH+"modules/twitter/twitter.html?v=10031",ico:App.getStaticUrl(NV_PATH+"modules/twitter/twitter.ico?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/twitter/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/twitter/m-twitter.css?v=9646")};
App.Modules.UWAInfos={
	title:("UWA Module"),infos:("Insert a third party module created with the Netvibes UWA"),defaultObj:{status:1,share:0,title:("UWA Module"),moduleName:"UWA",data:{}},path:NV_PATH+"modules/uwa/uwa2.js?v=9911",richIcon:App.getStaticUrl(NV_PATH+"modules/uwa/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"img/uwa.png?v=1000")};
App.Modules.EcoInfos={
	title:_("Latest Widgets"),infos:_("See latest widgets from Ecosystem."),defaultObj:{status:1,share:0,title:_("Latest Widgets"),moduleName:"Eco",data:{}},type:"uwa",path:NV_PATH+"modules/eco/eco.html?v=9006",richIcon:App.getStaticUrl(NV_PATH+"modules/eco/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"img/eco.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/eco/m-eco.css?v=1000")};
App.Modules.WebPageInfos={
	title:_("Web Page"),infos:_("Add any Web Page to your Netvibes"),defaultObj:{status:1,share:0,title:_("Web Page"),moduleName:"WebPage",data:{}},type:"uwa",path:NV_PATH+"modules/webpage/webpage.html?v=9326",richIcon:App.getStaticUrl(NV_PATH+"modules/webpage/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"modules/webpage/favicon.png?v=1000")};
App.Modules.FlashInfos={
	title:_("Flash"),infos:_("Create your own module based on a flash animation"),defaultObj:{status:1,share:0,title:_("Flash"),moduleName:"Flash",data:{}},type:"uwa",ico:App.getStaticUrl(NV_PATH+"modules/externalWidget/img/icon-api.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/flash/richicon.png?v=1000"),path:NV_PATH+"modules/flash/flash.html?v=6968"};
App.Modules.MultipleFeedsInfos={
	defaultObj:{status:1,share:0,moduleName:"MultipleFeeds",data:{}},type:"uwa",path:NV_PATH+"modules/multipleFeeds/multipleFeeds.html?v=1000"};
App.Modules.WallInfos={
	title:_("My Wall"),infos:_("Let people write you some nice messages"),defaultObj:{status:1,share:0,title:_("My Wall"),moduleName:"Wall",data:{}},type:"uwa",path:NV_PATH+"modules/wall/wall.html?v=1001",ico:App.getStaticUrl(NV_PATH+"modules/wall/favicon.png?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/wall/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/wall/m-wall.css?v=1001")};
App.Modules.MeeboRoomsInfos={
	title:_("Meebo Rooms"),infos:_("Create a chat room with Meebo Rooms"),defaultObj:{status:1,share:0,title:_("Meebo Rooms"),moduleName:"MeeboRooms",data:{}},type:"uwa",path:NV_PATH+"modules/meeboRooms/meeboRooms.html?v=1000",ico:App.getStaticUrl(NV_PATH+"modules/meeboRooms/favicon.png?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/meeboRooms/richicon.png?v=1000")};
App.Modules.UniverseSkypeInfos={
	title:_("Skype badge"),infos:"INFOS TODO !!!",defaultObj:{status:1,share:0,title:"Skype",moduleName:"UniverseSkype",data:{}},path:NV_PATH+"modules/universe/skype/skype.js?v=1000",ico:App.getStaticUrl(NV_PATH+"modules/universe/skype/favicon.ico?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/universe/skype/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/universe/imBadge.css?v=1001")};
App.Modules.UniverseYahooMessengerInfos={
	title:_("Yahoo! messenger badge"),infos:"INFOS TODO !!!",defaultObj:{status:1,share:0,title:"Yahoo! messenger",moduleName:"UniverseYahooMessenger",data:{}},path:NV_PATH+"modules/universe/yahooMessenger/yahooMessenger.js?v=1000",ico:App.getStaticUrl(NV_PATH+"modules/universe/yahooMessenger/favicon.ico?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/universe/yahooMessenger/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/universe/imBadge.css?v=1001")};
App.Modules.UniverseLiveMessengerInfos={
	title:_("Live Messenger badge"),infos:"INFOS TODO !!!",defaultObj:{status:1,share:0,title:"Live Messenger",moduleName:"UniverseLiveMessenger",data:{}},path:NV_PATH+"modules/universe/messenger/messenger.js?v=1000",ico:App.getStaticUrl(NV_PATH+"modules/universe/messenger/favicon.png?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/universe/messenger/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/universe/imBadge.css?v=1001")};
App.Modules.UniverseGTalkInfos={
	title:_("Google Talk badge"),infos:"INFOS TODO !!!",defaultObj:{status:1,share:0,title:"Google talk",moduleName:"UniverseGTalk",data:{}},path:NV_PATH+"modules/universe/gtalk/gtalk.js?v=1000",ico:App.getStaticUrl(NV_PATH+"modules/universe/gtalk/favicon.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/universe/gtalk/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/universe/imBadge.css?v=1001")};
App.Modules.UniverseICQInfos={
	title:_("ICQ badge"),infos:"INFOS TODO !!!",defaultObj:{status:1,share:0,title:"ICQ",moduleName:"UniverseICQ",data:{}},path:NV_PATH+"modules/universe/icq/icq.js?v=1000",ico:App.getStaticUrl(NV_PATH+"modules/universe/icq/favicon.ico?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/universe/icq/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/universe/imBadge.css?v=1001")};
App.Modules.UniverseAIMInfos={
	title:_("AIM badge"),infos:"INFOS TODO !!!",defaultObj:{status:1,share:0,title:"AIM",moduleName:"UniverseAIM",data:{}},path:NV_PATH+"modules/universe/aim/aim.js?v=1000",ico:App.getStaticUrl(NV_PATH+"modules/universe/aim/favicon.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/universe/aim/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/universe/imBadge.css?v=1001")};
App.Modules.UniverseQQInfos={
	title:_("QQ badge"),infos:"INFOS TODO !!!",defaultObj:{status:1,share:0,title:"QQ",moduleName:"UniverseQQ",data:{}},path:NV_PATH+"modules/universe/qq/qq.js?v=1000",ico:App.getStaticUrl(NV_PATH+"modules/universe/qq/favicon.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/universe/qq/richicon.png?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/universe/imBadge.css?v=1001")};
App.Modules.UniverseFacebookInfos={
	title:_("Facebook"),infos:"INFOS TODO !!!",defaultObj:{status:1,share:0,title:_("Facebook"),moduleName:"UniverseFacebook",data:{}},path:NV_PATH+"modules/universe/facebook/facebook.js?v=1001",richIcon:App.getStaticUrl(NV_PATH+"modules/facebook/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"modules/universe/facebook/favicon.ico?v=1000")};
App.Modules.UniversePicasaInfos={
	title:_("my Picasa albums"),infos:"INFOS TODO !!!",defaultObj:{status:1,share:0,title:_("my Picasa albums"),moduleName:"UniversePicasa",data:{}},type:"uwa",path:NV_PATH+"modules/universe/picasa/picasa.html?v=1000",richIcon:App.getStaticUrl(NV_PATH+"modules/universe/picasa/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"modules/universe/picasa/favicon.ico?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/universe/picasa/m-picasa.css?v=1000")};
App.Modules.UniverseYoutubeInfos={
	title:_("my YouTube videos"),infos:"INFOS TODO !!!",defaultObj:{status:1,share:0,title:_("my YouTube videos"),moduleName:"UniverseYoutube",data:{}},path:NV_PATH+"modules/universe/youtube/youtube.js?v=1000",richIcon:App.getStaticUrl(NV_PATH+"modules/universe/youtube/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"modules/universe/youtube/favicon.ico?v=1000")};
App.Modules.UniverseDailymotionInfos={
	title:_("my Dailymotion videos"),infos:"INFOS TODO !!!",defaultObj:{status:1,share:0,title:_("my Dailymotion videos"),moduleName:"UniverseDailymotion",data:{}},type:"uwa",path:NV_PATH+"modules/universe/dailymotion/dailymotion.html?v=1000",richIcon:App.getStaticUrl(NV_PATH+"modules/universe/dailymotion/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"modules/universe/dailymotion/favicon.ico?v=1000")};
App.Modules.UniverseLastFMInfos={
	title:_("Last.fm"),infos:"INFOS TODO !!!",defaultObj:{status:1,share:0,title:_("Last.fm"),moduleName:"UniverseLastFM",data:{}},path:NV_PATH+"modules/universe/lastfm/lastfm.js?v=1000",richIcon:App.getStaticUrl(NV_PATH+"modules/universe/lastfm/richicon.png?v=1000"),ico:App.getStaticUrl(NV_PATH+"modules/universe/lastfm/favicon.ico?v=1000")};
App.Modules.PriceWatchInfos={
	title:_("Kelkoo"),infos:_("Lets you keep an eye on the price evolution of a product by displaying its best prices from a comparison price database"),defaultObj:{status:1,share:0,title:_("Kelkoo"),moduleName:"PriceWatch",data:{query:"ipod nano",catId:"120501",nbOffers:"4"}},path:NV_PATH+"modules/priceWatch/priceWatch.js?v=6894",ico:App.getStaticUrl(NV_PATH+"img/kelkoo.gif?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/priceWatch/m-price.css?v=1500")};
App.Modules.EncyclopediaSearchInfos={
	title:_("Classic Web Search"),infos:_("The classic websearch module available in the previous versions of netvibes"),defaultObj:{status:1,share:0,title:_("Classic Web Search"),moduleName:"EncyclopediaSearch",data:{}},path:NV_PATH+"modules/EncyclopediaSearch/EncyclopediaSearch.js?v=9326",ico:App.getStaticUrl(NV_PATH+"img/search.gif?v=1000")};
App.Modules.WritelyInfos={
	title:_("Writely Documents"),infos:_("Keep track of updates on your Writely active documents (Writely is a very simple web document sharing service - www.writely.com)"),defaultObj:{status:1,share:0,title:_("Writely Documents"),moduleName:"Writely",data:{}},path:NV_PATH+"modules/writely/writely.js?v=6894",ico:App.getStaticUrl(NV_PATH+"img/writely.gif?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/writely/m-writely.css?v=1500")};
App.Modules.BlogmarksnetInfos={
	title:_("Blogmarks"),infos:_("Keep your blogmarks.net bookmarks visible on your page with this module."),defaultObj:{status:1,share:0,title:_("Blogmarks"),moduleName:"Blogmarksnet",data:{}},path:NV_PATH+"modules/blogmarksnet/blogmarksnet.js?v=10084",ico:App.getStaticUrl(NV_PATH+"img/blogmarksnet.png?v=1000"),css:[App.getStaticUrl(NV_PATH+"modules/blogmarksnet/m-blogmarks.css?v=1500"),App.getStaticUrl(NV_PATH+"modules/bookmarks/m-bookmark.css?v=6237")]};
App.Modules.ApiInfos={
	title:_("Mini API module"),infos:_("Insert a third party module created with the Netvibes Mini API"),defaultObj:{status:1,share:0,title:_("Mini API module"),moduleName:"Api",data:{}},path:NV_PATH+"modules/api/api.js?v=10085",ico:App.getStaticUrl(NV_PATH+"img/netvibes.gif?v=1000")};
App.Modules.ImageModuleInfos={
	title:_("Picture widget"),infos:_("Upload and display an image directly in your module"),defaultObj:{status:1,share:0,title:_("Image widget"),moduleName:"ImageModule",data:{}},path:NV_PATH+"modules/universe/image/image.js?v=10084",ico:App.getStaticUrl(NV_PATH+"img/icons/picture.gif?v=1000"),richIcon:App.getStaticUrl(NV_PATH+"modules/universe/image/richicon.png?v=1000")};
App.Modules.ThemeSelectorInfos={
	title:_("Theme selector"),infos:_("Select a theme from the list"),defaultObj:{status:1,share:0,title:_("Theme selector"),moduleName:"ThemeSelector",data:{}},path:NV_PATH+"modules/themeSelector/themeSelector.js?v=10084",ico:App.getStaticUrl(NV_PATH+"img/icons/palette.gif?v=1000"),css:App.getStaticUrl(NV_PATH+"modules/themeSelector/themeSelector.css?v=1500")};
for(var name in App.Modules){
	var module=App.Modules[name];
	if(typeof module=="object"&&module.type&&module.type=="uwa"){
		if(App.use_compressed_js&&module.type=="uwa"){
			var version=module.path.match("v=([0-9.]+$)")[1];
			module.path=App.getStaticUrl(NV_PATH+"js/c/"+module.defaultObj.moduleName.toLowerCase()+".uwa.js");
			module.path+="?v="+version
		}else{
			var moduleUrl=module.path;
			module.path=NV_PATH+"api/uwa/compile/netvibes.php?name="+module.defaultObj.moduleName.toLowerCase()
						+"&moduleUrl="+encodeURIComponent("http://"+NV_HOST+moduleUrl)
		}
	}
};;

//9
App.ColManager=null;
App.Columns=Class.create();
App.Columns.MAX_COLNUM=4;
App.Columns.prototype={
	initialize:function(C,A){
		this.setOptions(A);
		this.columnDivs=[];
		this.container=document.createElement("div");
		this.container.setAttribute("id","columns");
		this.drag=false;
		this.numCols=-1;
		this.columnSizes=[];
		for(var B=0;B<App.Columns.MAX_COLNUM;B++){
			this.createColumn()
		}
		$(C).appendChild(this.container)
	},
	setOptions:function(A){
		this.options={enableResize:true,minWidth:140};
		Object.extend(this.options,A||{})
	},
	createColumn:function(){
		var B=this.columnDivs.length+1;
		var D=document.createElement("div");
		D.className="column"+(this.options.enableResize?" resizable":"");
		D.style.minHeight="1px";
		D.setAttribute("colNum",B);
		this["col"+B]=D;
		this.container.appendChild(D);
		this.columnDivs.push(D);
		if(this.options.enableResize&&B<App.Columns.MAX_COLNUM){
			var A=this;
			var C=document.createElement("div");
			C.className="gripper";C.style.cursor=Browser.isMozilla?"ew-resize":"e-resize";
			C.onmouseover=function(){if(!A.drag){Element.addClassName(this,"hover")}};
			C.onmouseout=function(){if(!A.drag){Element.removeClassName(this,"hover")}};
			C.onmousedown=this.onResizeStart.bindAsEventListener(this);
			C.ondblclick=this.onResizeDblClick.bindAsEventListener(this);
			this.container.appendChild(C);Element.hide(C)
		}
	},
	onResizeStart:function(C){
		var B=Event.element(C);
		this.drag=true;document.body.style.cursor=Browser.isMozilla?"ew-resize":"e-resize";
		this.resizeInfos={
			startX:Event.pointerX(C),
			gripper:B,
			originalWidth:Element.getDimensions(B.previousSibling).width,
			originalRight:Element.getDimensions(B.nextSibling).width
		};
		var A=$("resize-iframeFix");
		if(A){Element.remove(A)}
		A=document.createElement("div");
		A.id="resize-iframeFix";A.style.position="absolute";
		A.style.top="0";A.style.right="0";A.style.width="100%";A.style.height="100%";A.style.visibility="hidden";
		A.onmousemove=this.onResizing.bindAsEventListener(this);
		document.body.appendChild(A);
		Event.observe(document,"mousemove",this.onResizing.bindAsEventListener(this));
		Event.observe(document,"mouseup",this.onResizeEnd.bindAsEventListener(this));Event.stop(C)},
	onResizing:function(D){
		if(!this.drag){return }
		var B=$("resize-iframeFix");
		if(B.style.visibility!="visible"){B.style.visibility="visible"}
		var E=Event.pointerX(D)-this.resizeInfos.startX;
		var A=this.resizeInfos.originalWidth+E;
		var C=this.resizeInfos.originalRight-E;
		if((A>this.options.minWidth)&&(C>this.options.minWidth)){
			this.resizeInfos.gripper.previousSibling.style.width=A+"px";
			this.resizeInfos.gripper.nextSibling.style.width=C+"px";
			Element.removeClassName(this.resizeInfos.gripper,"max")
		}else{
			if(A>this.options.minWidth){
				E=this.resizeInfos.originalRight-this.options.minWidth;
				this.resizeInfos.gripper.previousSibling.style.width=(this.resizeInfos.originalWidth+E)+"px"
			}else{this.resizeInfos.gripper.previousSibling.style.width=this.options.minWidth+"px"}
			if(C>this.options.minWidth){
				E=this.options.minWidth-this.resizeInfos.originalWidth;
				this.resizeInfos.gripper.nextSibling.style.width=(this.resizeInfos.originalRight-E)+"px"
			}else{this.resizeInfos.gripper.nextSibling.style.width=this.options.minWidth+"px"}
			Element.addClassName(this.resizeInfos.gripper,"max")}Event.stop(D)
	},
	onResizeEnd:function(B){
		if(!this.drag){return }
		this.drag=false;
		document.body.style.cursor="default";
		var A=$("resize-iframeFix");
		if(A){Element.remove(A)}
		Event.stopObserving(document,"mousemove",this.onResizing);
		Event.stopObserving(document,"mouseup",this.onResizeEnd);
		Element.removeClassName(this.resizeInfos.gripper,"hover");
		Element.removeClassName(this.resizeInfos.gripper,"max");
		var C=Event.pointerX(B)-this.resizeInfos.startX;
		if(Math.abs(C)<=1){return }
		this.columnDivs.each(function(E,D){App.selectedTabObj.dataObj.columnSizes[D]=Element.visible(E)?Element.getDimensions(E).width:0});
		this.saveLayout();this.updateLayout(true)
	},
	onResizeDblClick:function(){this.resetLayout();this.saveLayout()},
	resetLayout:function(B){
		for(var A=0;A<App.Columns.MAX_COLNUM;A++){
			this.columnSizes[A]=(A<this.numCols)?1:0}this.updateLayout(true);if(B){Event.stop(B)}},
	updateLayout:function(C){
		if(this.numCols<0){return }
		if(!this.columnSizes){this.columnSizes=[]}
		for(var B=0;B<App.Columns.MAX_COLNUM;B++){
			this.columnSizes[B]=parseInt(this.columnSizes[B],10);
			if(!this.columnSizes[B]){this.columnSizes[B]=1}if((B+1)>this.numCols){this.columnSizes[B]=0}}
		var F=$A(this.columnSizes);
		if(this.options.enableResize){F.normalize((this.numCols==4||Browser.getClientWidth()<900)?97:97.7)}else{F.normalize(99.7)}
		for(var B=0,E;E=this.columnDivs[B];B++){
			if(F[B]<=0.01){F[B]=0}
			E.style.width=F[B]+"%";
			var A=(E.previousSibling&&Element.hasClassName(E.previousSibling,"gripper"))?E.previousSibling:null;
			if(B<this.numCols){Element.show(E);
				if(A){Element.show(A)}
				var D=(E.nextSibling&&Element.hasClassName(E.nextSibling,"gripper"))?E.nextSibling:null;
				if(D){Element.hide(D)}
			}else{Element.hide(E);if(A){Element.hide(A)}}
		}
		if(C){App.Modules.notifyResize()}
	},
	saveLayout:function(){
		var A=$A(this.columnSizes);
		if(!A.equals(App.selectedTabObj._savedColumnSizes)){
			App.saveUserData("tab",App.selectedTabObj.dataObj);App.selectedTabObj._savedColumnSizes=A
		}
	}
};

App.LayoutManager={};
App.LayoutManager.canMovePositionUp=function(A){return(App.LayoutManager.getModulePosition(A)[1]>0)};
App.LayoutManager.canMovePositionDown=function(A){
	var C=App.LayoutManager.getModulePosition(A);
	var B=App.ColManager["col"+A.dataObj.container];
	return((C[1]+1)<App.LayoutManager.getModulesByColumn(B).length)};
App.LayoutManager.canMovePositionLeft=function(A){
	return(A.dataObj.container>1)};
App.LayoutManager.canMovePositionRight=function(A){return(A.dataObj.container<App.selectedTabObj.dataObj.cols)};
App.LayoutManager.movePositionUp=function(B){
	if(!App.LayoutManager.canMovePositionUp(B)){return false}
	var D=App.ColManager["col"+B.dataObj.container];
	var C=App.LayoutManager.getModulesByColumn(D);
	for(var E=0,F;F=C[E];E++){
		if(F.dataObj.id!=B.dataObj.id){continue}
		var A=(E>0)?C[E-1]:null;
		if(A){D.insertBefore(B.elm_module,A);App.saveUserData("order",B)}}};
App.LayoutManager.movePositionDown=function(B){
	if(!App.LayoutManager.canMovePositionDown(B)){return false}var D=App.ColManager["col"+B.dataObj.container];var C=App.LayoutManager.getModulesByColumn(D);for(var E=0,F;F=C[E];E++){if(F.dataObj.id!=B.dataObj.id){continue}var A=C[E+2];if(A){D.insertBefore(B.elm_module,A)}else{D.appendChild(B.elm_module)}App.saveUserData("order",B)}};
App.LayoutManager.movePositionTop=function(A){
	var C=App.ColManager["col"+A.dataObj.container];var B=App.LayoutManager.getModulesByColumn(C);if(B.length>0){C.insertBefore(A.elm_module,B[0]);App.saveUserData("order",A)}};
App.LayoutManager.movePositionBottom=function(A){
	var B=A.dataObj.container;App.ColManager["col"+B].appendChild(A.elm_module);App.saveUserData("order",A)};
App.LayoutManager.getModulePosition=function(B){
	var A=B.dataObj.container;var D=App.ColManager["col"+A];var C=App.LayoutManager.getModulesByColumn(D);for(var E=0;E<C.length;E++){if(C[E].dataObj.id==B.dataObj.id){break}}return[A,E]};
App.LayoutManager.getFreePosition=function(){
	for(var B=1,C=0;;B++){var A=App.ColManager["col"+B];if(typeof App.LayoutManager.getModulesByColumn(A)[C]=="undefined"){break}if(App.ColManager.numCols==B){B=0;C++}}return[B,C]};
App.LayoutManager.getModulesByColumn=function(D,B){
	if(typeof B=="undefined"||!B){B=App.selectedTab}var A=[];var E=D.childNodes.length;for(var C=0;C<E;C++){var F=D.childNodes[C];if(F.dataObj&&F.dataObj.tab==B){A.push(F)}}return A};
App.LayoutManager._movePosition=function(B,F){
	var H=App.LayoutManager.getModulePosition(B);
	var D=B.dataObj.container;if(F=="left"){D--}else{if(F=="right"){D++}}var G=App.ColManager["col"+D];if(G){var A=null;var C=App.LayoutManager.getModulesByColumn(G);for(var E=0;E<C.length;E++){if(H[1]==E){A=C[E];break}}if(A){G.insertBefore(B.elm_module,A)}else{G.appendChild(B.elm_module)}B.dataObj.container=D;App.saveUserData("order",B)}};
App.LayoutManager.movePositionLeft=function(A){
	if(!App.LayoutManager.canMovePositionLeft(A)){return false}App.LayoutManager._movePosition(A,"left")};
App.LayoutManager.movePositionRight=function(A){
	if(!App.LayoutManager.canMovePositionRight(A)){return false}App.LayoutManager._movePosition(A,"right")};
App.LayoutManager.getModuleRow=function(A){
	var E=A.elm_module.previousSibling;var G=-1;while(E){if(E.dataObj&&E.dataObj.tab==A.dataObj.tab){G=parseInt(E.dataObj.row,10);break}E=E.previousSibling}var D=A.elm_module.nextSibling;var C=-1;while(D){if(D.dataObj&&D.dataObj.tab==A.dataObj.tab){C=parseInt(D.dataObj.row,10);break}D=D.nextSibling}if(G<0&&C<0){return 1000}if(C<0){return G+1000}if(G<0){return(C>0)?C/2:1000}var F=(C-G);var B=G+F/2;if(F<=1){return 0}return B};
App.LayoutManager.getResetColumnOrder=function(A){
	var C=A.dataObj.container;var B=A.dataObj.tab;var G=[];var F=App.ColManager["col"+C];var H=F.childNodes.length;var I=1000;for(var E=0;E<H;E++){var D=F.childNodes[E].dataObj;if(!D||(!D.id&&!D.tempId)){continue}if(B&&D.tab!=B){continue}D.row=I;G.push((D.id||D.tempId)+":"+I);I+=1000}return G.join(",")};;
//10
App.Login={};
App.Login.Register={};
App.Login.show=function(){
	SqueezeBox.fromElement(this.build(),{
		handler:"adopt",
		classWindow:"modal",
		classOverlay:"wizard-overlay",
		closeWithOverlay:false,
		size:{x:500,y:"auto"},
		onOpen:this.attachSignInEvents.bind(this)
	})
};
App.Login.register=function(){
	var A=new App.Login.Register();
	SqueezeBox.fromElement(A.toElement(),{handler:"adopt",classWindow:"modal",classOverlay:"wizard-overlay",closeWithOverlay:false,size:{x:450,y:"auto"}})};
App.showSignup=function(){App.Login.register()};
App.Login.build=function(){
	var B="";
	B+='<div id="signinWrapper" class="autoclear">';
	B+='<h2 class="title">'+_("Sign in")+"</h2>";
	B+='<form id="signinForm" method="post">';
	B+='<p id="signinError" class="error" style="display:none"></p>';
	B+='<p class="field">';
	B+='<label id="signinEmailLabel" for="signinEmail">'+_("Email:")+"</label>";
	B+='<input id="signinEmail" name="email" type="text" class="text email" maxlength="50" tabindex="1" />';
	B+="</p>";
	B+='<p class="field">';
	B+='<label id="signinPasswordLabel" for="signinPassword">'+_("Password:")+'<a id="signinLostPassword" href="javascript:void(0)">'+_("(lost password?)")+"</a></label>";
	B+='<input id="signinPassword" name="password" type="password" class="text password" maxlength="50" tabindex="2" />';
	B+="</p>";
	B+="<p>";
	B+='<input id="signinSessionOnly" name="session_only" type="checkbox" class="checkbox" value="1" tabindex="3" /> <label for="signinSessionOnly" style="display:inline;">'+_("Remember me")+"</label>";
	B+="</p>";
	B+='<p class="submit">';
	B+='<input id="signinButton" type="submit" class="nv-button nv-primary-button" value="'+_("Sign in")+'" tabindex="4" />';
	B+="</p>";
	B+="</form>";
	B+='<div id="signupTeaser">';
	B+="<h3>"+_("Not a member yet?")+"</h3>";
	B+='<p><a id="signupNow" class="nv-button"><span>'+_("Sign up")+"</span></a></p>";
	B+='<p><a class="more-infos" href="http://get.netvibes.com">'+_("more info on {0}").format("get.netvibes.com")+"</a></p>";
	B+="</div>";
	B+="</div>";
	var A=new Element("div",{id:"nv-signin"}).set("html",B);
	return A};
App.Login.attachSignInEvents=function(A){
	var E=$("signinForm");
	if(E){E.onsubmit=App.Login.onLoggingIn}
	var B=$("signupNow");
	if(B){B.onclick=function(){SqueezeBox.close();App.Login.register();return false}}
	var C=$("signinLostPassword");
	if(C){C.onclick=App.Login.onLostPassword}
	var D=$("signinEmail");
	if(D){(function(){D.focus()}).delay(300)}};
App.Login.onLoggingIn=function(D){
	var C=$("signinButton");
	var B=$("signinEmail").value.trim();
	var A=$("signinPassword").value;
	var F=true;
	if(!String.isEmail(B)){$("signinEmail").yellowFade();F=false}
	if(!A.length){$("signinPassword").yellowFade();F=false}
	if(!F){$("signinError").set("text",_("Invalid email or password")).show();return false}
	var E="email="+encodeURIComponent(B);
	if(!$("signinSessionOnly").checked){E+="&session_only=1"}
	new Request({onRequest:function(){C.disabled=true;C.set("value",_("Loading..."))},onSuccess:function(G){E+="&password="+encodeURIComponent(md5(G+A));new Request({onComplete:function(H){if(H=="success"){if(App.subscribeQuery){window.location.href="subscribe.php?"+App.subscribeQuery;return }window.location.hash="";window.location.reload()}else{$("signinEmail").yellowFade();$("signinPassword").yellowFade();$("signinError").set("text",_("Invalid email or password")).show();C.set("value",_("Sign in"));C.disabled=false}}}).post("/ajax/user/signIn.php",E)}}).get("/ajax/user/signIn.php",{seed:1});
	return false};
App.Login.onLostPassword=function(){
	var C=$("signinWrapper").hide();
	var B=$("lostPassword");
	if(!B){
		var E="";
		E+='<h2 class="title">'+_("Lost password?")+"</h2>";
		E+='<form id="lostPasswordForm" method="post">';
		E+='<p id="forgotErrorMsg" class="error" style="display: none;"></p>';
		E+="<p>"+_("Enter your e-mail address to recover your password.")+"</p>";
		E+='<p class="field">';
		E+='<label id="forgotEmailLabel" for="forgotEmail">'+_("Email:")+"</label>";
		E+='<input id="forgotEmail" name="email" type="text" class="text email" maxlength="50" />';
		E+="</p>";E+="<p>";
		E+='<input id="forgotButton" type="submit" class="nv-button nv-primary-button" value="'+_("Send")+'" />';
		E+="</p>";E+="<p>";
		E+='<a id="backToSignIn" href="javascript:void(0)" rel="prev">&lt; '+_("Back")+"</a>";
		E+="</p>";E+="</form>";
		B=new Element("div",{id:"lostPassword"}).setHTML(E).injectAfter(C);
		var A=$("backToSignIn");
		A.onclick=function(){B.hide();C.getElement(".error").hide();C.show()};
		var D=B.getElementsByTagName("form")[0];
		D.onsubmit=App.Login.onSendingPassword
	}
	$("forgotErrorMsg").hide();
	B.show()};
App.Login.requestPwd=null;
App.Login.onSendingPassword=function(){
	var A=$("forgotErrorMsg");
	var B=$("forgotEmail").value.trim();
	if(!String.isEmail(B)){
		$("forgotEmail").yellowFade().focus();
		A.className="error";
		A.set("text",_("Please enter a valid email.")).show()
	}else{
		if(!(App.Login.requestPwd&&App.Login.requestPwd.running)){
			App.Login.requestPwd=new Request({url:"/recoverPwd.php",onComplete:App.Login.onLostPasswordResponse}).POST({action:"sendpwd",email:B})
		}
	}return false};
App.Login.onLostPasswordResponse=function(B){
	var A=$("forgotErrorMsg");
	switch(B){
		case"success":
		A.className="info";A.set("text",_("The new password procedure has been sent to your email.")).show();
		break;
		case"nomatch":
		default:
			$("forgotEmail").focus();
			A.className="error";
			A.set("text",_("There is no match in the database, check your info and try again.")).show();
			break
	}
	App.Login.requestPwd=null};
App.Login.Register=new Class({
	toElement:function(){
		var A=new Element("div",{id:"nv-signin"});
		var B="";B+='<h2 class="title">'+_("Sign up")+"</h2>";
		if(!this.wizard){B+='<form id="signupForm" method="post">'}
		B+='<p class="error" style="display:none"></p>';B+='<p class="field">';
		B+='<label for="signupEmail">'+_("E-mail address:")+"</label>";
		B+='<input id="signupEmail" name="email" type="text" class="text email" value="'+(User.email||"")+'" autocomplete="off" /><img src="'+App.getStaticUrl("/img/s.gif")+'" width="16" height="16" />';
		B+='<em class="description">'+_("A confirmation email will be sent. We don't sell your email.")+"</em>";B+="</p>";
		B+='<p class="field">';B+='<label for="signupPassword">'+_("Password:")+"</label>";
		B+='<input id="signupPassword" class="text" name="password" type="password" /><img src="'+App.getStaticUrl("/img/s.gif")+'" width="16" height="16" />';
		B+='<em class="description">'+_("at least 6 characters")+"</em>";B+="</p>";
		B+='<p class="field">';B+='<label for="signupConfirmPassword">'+_("Confirm Password:")+"</label>";
		B+='<input id="signupConfirmPassword" name="confirmPassword" class="text" type="password" /><img src="'+App.getStaticUrl("/img/s.gif")+'" width="16" height="16" />';B+="</p>";
		B+="<p>";B+='<input id="acceptTos" type="checkbox" /> <label for="acceptTos">'+_('I agree with the <a href="{0}" target="_blank">Terms of Service</a>').format("http://"+NV_HOST+"/static.php?show=tos&target=_blank")+'</label><img src="'+App.getStaticUrl("/img/s.gif")+'" width="16" height="16" />';B+="</p>";
		if(!this.wizard){
			B+='<p class="submit">';
			B+='<input id="signupButton" type="submit" class="nv-button nv-primary-button" value="'+_("Sign up")+'" />';
			B+="</p>"
		}
		B+='<div id="frameTos"></div>';
		if(!this.wizard){B+="</form>"}
		A.set("html",B);
		this.attachEvents(A);
		return A
	},
	attachEvents:function(B){
		var A=B.getElements("input");
		this.inputEmail=A[0];this.inputPassword=A[1];this.inputConfirmPassword=A[2];
		this.inputAcceptTos=A[3];this.errorMsg=B.getElement(".error");
		this.inputEmail.addEvent("blur",this.validateEmail.bindWithEvent(this));
		this.inputPassword.addEvent("blur",this.validatePassword.bindWithEvent(this));
		this.inputConfirmPassword.addEvents({
			blur:this.validateConfirmPassword.bindWithEvent(this),keyup:this.validateConfirmPassword.bindWithEvent(this)});
		this.inputAcceptTos.addEvent("change",this.validateTos.bind(this));
		var C=$(B.getElementsByTagName("form")[0]);
		if(C){C.addEvent("submit",function(D){D.stop();this.onFinish()}.bind(this))}},
	onShowTOS:function(A){
		App.displaySiteInformation(NV_PATH+"js/loc/"+App.lang.substring(0,2)+"_tos.html",A.target);A.stop()},
	validate:function(){
		var A=(this.validateEmail()&this.validatePassword()&this.validateConfirmPassword()&this.validateTos());
		if(A){}else{this.errorMsg.show().innerHTML=_("Please correct the errors below")}return A},
	validateEmail:function(B){
		var A=String.isEmail(this.inputEmail.value);
		if(this.inputEmail.value.length||!B){this.inputEmail.getNext().className=A?"valid":"invalid"}return A},
	validatePassword:function(C){
		var B=this.inputPassword.value.length;var A=(B>=6);if(B||!C){this.inputPassword.getNext().className=A?"valid":"invalid"}return A},
	validateConfirmPassword:function(C){
		var B=this.inputConfirmPassword.value.length;
		var A=(B>=6&&this.inputPassword.value==this.inputConfirmPassword.value);
		if(B||!C){this.inputConfirmPassword.getNext().className=A?"valid":"invalid"}return A},
	validateTos:function(){
		var A=!!(this.inputAcceptTos.checked);this.inputAcceptTos.getNext("img").className=A?"valid":"invalid";return A},
	onFinish:function(B){
		if(this.validate()&&!(this.request&&this.request.running)){var A=$("signupButton");A.disabled=true;A.value=_("Saving...");this.request=new Request({url:"/ajax/user/signUp.php",onComplete:this.onRegistered.bind(this)}).post({email:this.inputEmail.value,password:this.inputPassword.value})}},
	onRegistered:function(B){
		switch(B){
			case"success":this.confirmRegistration();break;
			case"inuse":
				var A=$("signupButton");if(A){A.disabled=false;A.value=_("Sign up")}this.errorMsg.show().innerHTML=_("Sorry, this email address is already in use");this.inputEmail.getNext().className="invalid";this.inputEmail.yellowFade();break
		}
		this.request=null
	},
	confirmRegistration:function(){Cookie.set("registered",1);window.location.reload(true)}
});;

//11
App.Request={};
App.Request.JSON={};
Request.implement(
	{
		initialize:function(A){
			if(!(this.xhr=this.getXHR())){
				return 
			}
			this.setOptions(A);
			this.options.isSuccess=this.options.isSuccess||this.isSuccess;
			this.headers=new Hash(this.options.headers);
			this.addEvents({onRequest:App.Request.onRequest.bind(this),onComplete:App.Request.onComplete.bind(this),onFailure:App.Request.onFailure.bind(this),onCancel:App.Request.hideThrobber.bind(this)})
		}
	}
);
App.Request.newRequest=function(A){
	var B=new Request(A||{});
	if(/userData\.php/.test(B.options.url)){if(App.visit){B.options.data.visit=App.visit.id}}
	return B
};
App.Request.onRequest=function(){
	if(this.options.method.toLowerCase()=="post"){App.Request.showThrobber()}
	var B=$type(this.options.data);
	if(B!="object"&&B!="hash"){return }
	switch(this.options.data.mode){
		case"close":
			var A=App.Modules.getById(this.options.data.id);
			App.report("module.remove",{name:A.dataObj.moduleName,id:A.dataObj.id,ident:A.getIdentifier()});
		break;
		case"module.archive":
			var A=App.Modules.getById(this.options.data.id);
		break;
		case"module.restore":
			var A=App.Modules.getById(this.options.data.id);
		break;
		case"module.add2page":
			var A=App.Modules.getById(this.options.data.id);
			App.report("module.add2page",{name:A.dataObj.moduleName,id:A.dataObj.id,ident:A.getIdentifier()});
		break;
		case"localContent":break;
		default:break
	}
};
App.Request.showThrobber=function(){
	var A=$("savingStatus");
	if(A){A.setStyles({visibility:"visible","background-color":"#FF0000"})}
};
App.Request.hideThrobber=function(){var A=$("savingStatus");if(A){A.setStyle("visibility","hidden")}};
App.Request.onComplete=function(){App.Request.hideThrobber()};
App.Request.onFailure=function(A){};
var feedProxyCache={};
var feedProxyBuffer=null;
var feedProxyCacheUsed=false;
var feedProxyCacheWaitTime=800;
App.Request.send=function(C,A,L,G,E,D,I){
	var J;
	var K=false;
	if(window.XMLHttpRequest){J=new XMLHttpRequest()}else{if(window.ActiveXObject){J=new ActiveXObject("Microsoft.XMLHTTP")}}
	if(typeof D=="undefined"){D=""}else{D+="\n"}
	if(typeof I=="undefined"){I=false}
	var B=function(){
		if(J.readyState==4){
			if(J.status<400){
				if(A=="POST"){
					if(K){
						var M=J.responseText.split("|n||FEED||v|");
						for(i in M){if(typeof M[i]!="string"){continue}var P=M[i].split("|n||URL||v|");C=P[0];if(typeof C=="undefined"){continue}var O="nv"+escape(C);var R=feedProxyCache[O];if(typeof R=="undefined"){O+="&rss=1";R=feedProxyCache[O];if(typeof R=="undefined"){continue}C+="&rss=1"}for(var N=R.length-1;N>=0;N--){var Q=R[N];J={responseText:P[1]};L=Q[0];G=Q[1];if(typeof L=="function"){L(J,G)}delete L;feedProxyCache[O][N]=null}feedProxyCache[O]=null}
						for(i in feedProxyCache){if(i.substr(0,2)!="nv"){continue}C=unescape(i.substr(2));var R=feedProxyCache[i];if(!R){continue}for(var N=R.length-1;N>=0;N--){var Q=R[N];L=Q[0];G=Q[1];if(C.substr(C.length-6)=="&rss=1"){myurl=feedProxyURL+escape(C.substr(0,C.length-6))+"&rss=1"}else{myurl=feedProxyURL+escape(C)}App.Request.send(myurl,"GET",L,G,false,"",true)}}
						M=null;R=null;Q=null;P=null;feedProxyCache={};feedProxyCacheUsed=false
					}else{
						if(typeof L=="function"){L(J)}
					}
				}else{if(typeof L=="function"){L(J,G)}}
			}else{
				if(typeof J=="undefined"||typeof J.status=="undefined"){
				}else{
					if(J.status==401||J.statusText.toLowerCase()=="unauthorized"){
						L(J)
					}else{
						if(J.status==404){
						}else{
							if(App.errorShowing){return false}
							App.errorShowing=true;
							switch(J.status){
								case 12002:case 12007:case 12029:case 12030:case 12031:case 12152:
								case 13030:
									if(App.showErrors){alert(D+_("There was a network problem. Please reload the page."))}
								break;
								case 500:case 503:
									if(App.showErrors){alert(D+_("There was an internal server error. Please try later."))}
								break;
								default:
									if(App.showErrors){
										alert(_("There was a problem loading data:")+"\nstatus: "+J.status+"/"+J.statusText+"\n"+C)
									}
							}
							App.errorShowing=false
						}
					}
				}
			}
			delete L;
			L=null;
			delete J;J=null
		}
	};
	function H(){
		if(A=="POST"){
			J.open("POST",C,true);
			if(E){
				J.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
			}
			J.setRequestHeader("X-Requested-With","XMLHttpRequest");
			J.onreadystatechange=B;
			J.send(G)
		}else{
			J.open("GET",C,true);
			J.setRequestHeader("X-Requested-With","XMLHttpRequest");
			J.onreadystatechange=B;
			J.send(null)
		}
	}
	urlCheck=new RegExp("(getpassword|nocache|test|item)=","i");
	if(A!="POST"&&!I&&App.speedUp&&!App.eTag&&C.substr(0,feedProxyURL.length)==feedProxyURL&&!feedProxyCacheUsed&&C.substr(C.length-6)=="&rss=1"&&!urlCheck.test(C)){
		var F="nv"+C.substr(feedProxyURL.length).replace(/&rnd=[0-9.]+/,"");
		if(!feedProxyCache[F]){feedProxyCache[F]=[]}feedProxyCache[F][feedProxyCache[F].length]=[L,G];
		if(feedProxyBuffer){clearTimeout(feedProxyBuffer)}
		feedProxyBuffer=setTimeout(
			function(){C=feedProxyURL.replace(/\?url=/,"");
			G="";t="";
			for(i in feedProxyCache){if(i.substr(0,2)!="nv"){continue}G+=t+"url[]="+i.substr(2);t="&"}
			K=true;feedProxyCacheUsed=true;A="POST";E=true;H()},feedProxyCacheWaitTime
		);
		feedProxyCacheWaitTime=300;
		return false
	}
	H();
	return J
};

App.Request.sendRawPOST=function(B,C,D,A){App.Request.send(B,"POST",D,C,false,A)};
App.Request.sendPOST=function(B,C,D,A){App.Request.send(B,"POST",D,C,true,A)};
App.Request.sendGET=function(C,D,B,A){return App.Request.send(C,"GET",D,B,A)};
App.reportBuffer=null;
App.reportBufferCounter=0;
App.reportTimeout=null;
App.report=function(D,E){
	if(!App.enableStats){return false}
	var B="",C="";
	if(D=="module.view"){
		if(App.reportTimeout){
			clearTimeout(App.reportTimeout)
		}
		if(!App.reportBuffer){
			App.reportBuffer="";App.reportBufferCounter=0
		}
		B="["+App.reportBufferCounter+"]";
		App.reportBufferCounter+=1
	}
	for(var A in E){
		if(typeof E.hasOwnProperty!="string"&&!E.hasOwnProperty(A)){continue}if(typeof E[A]=="function"){continue}C+="&"+A+B+"="+E[A]
	}
	if(D=="module.view"){
		App.reportBuffer+=C;
		App.reportTimeout=setTimeout(App.doReport,400);return 
	}
	App.doReport(D,C)
};

App.doReport=function(A,B){
	if(App.reportBuffer){A="module.view";B=App.reportBuffer;App.reportBuffer=null;App.reportBufferCounter=0}if(App.visit&&App.visit.id){B+="&visit="+App.visit.id}if(App.brand){B+="&brand="+App.brand}if(typeof A=="undefined"||!A){return }App.Request.sendPOST(NV_PATH+"report.php","event="+A+B,function(){})};
App.moduleObjWaitingForId=[];
App.doResponseAction=function(E,I,H){
	function D(M,K){
		var N=App.moduleObjWaitingForId.length;
		for(var O=0;O<N;O++){
			if(App.moduleObjWaitingForId[O].dataObj.tempId==M){
				var L=App.moduleObjWaitingForId[O];
				L.dataObj.id=K;L.dataObj.tempId=null;
				L.setUnread();App.moduleObjWaitingForId.splice(O,1);
				break
				}
		}
		L.loadContent();
		return L
	}
	function G(M,K){
		var N=App.tabList.length;
		for(var P=0;P<N;P++){
			var O=App.tabList[P];
			if(O.dataObj.id==M){O.dataObj.id=K;O.elm.id="tab"+K;if(App.selectedTab==M){App.selectedTab=K}break}
		}
		var N=App.moduleList.length;
		for(var P=0;P<N;P++){if(App.moduleList[P].dataObj.tab==M){var L=App.moduleList[P];L.dataObj.tab=K;L.save()}}
	}
	function B(K){
		var L=App.moduleList.length;
		for(var M=L-1;M>=0;M--){if(App.moduleList[M].dataObj.tab==K){App.moduleList[M].remove(false)}}
	}
	function J(N,M){
		var L=null;var O=App.tabList.length;var K=-1;
		for(var P=0;P<O;P++){if(App.tabList[P].dataObj.id==N){K=P}else{if(App.tabList[P].dataObj.id==M){L=App.tabList[P]}}}
		var O=App.moduleList.length;
		for(var P=0;P<O;P++){
			if(App.moduleList[P].dataObj.tab==N){
				App.moduleList[P].dataObj.tab=M;L.unRead[App.moduleList[P].dataObj.id]=App.moduleList[P].dataObj.unRead
			}
		}
		if(L){L.switchTo()}
		if(K>-1){
			Element.remove(App.tabList[K].elm);
			App.tabList[K].self=null;
			delete App.tabList[K];App.tabList[K]=null;
			App.tabList.splice(K,1)
		}
	}
	var A;
	if(I){
		switch(E){
			case"module":break;case"order":break;case"collapseExpand":break;case"history":break;case"close":break;case"tabdelete_mod":B(H.from);case"tabdelete":J(H.from,H.to);break;case"tab":case"taborder":break;
			case"newtab_mod":
				G(H[0].tempId,H[0].newId);App.openTabId=H[0].newId;Cookie.set("opentab",App.openTabId);
				var F=H[1].length;
				for(var C=0;C<F;C++){
					A=D(H[1][C].tempId,H[1][C].newId);App.report("module.new",{name:A.dataObj.moduleName,id:H[1][C].newId,ident:A.getIdentifier()})
				}
			break;
			case"newtab":
				G(H.tempId,H.newId);break;
			case"new":
				A=D(H.tempId,H.newId);
				if(H.tempId==App.subscribeTempId){App.subscribeTempId=null;status="anon";if(App.newUser){status="new"}else{if(App.registeredUser){status="reg"}}App.report("subscribe",{referrer:App.subscribeReferrer,name:A.dataObj.moduleName,id:H.newId,status:status})}
				App.report("module.new",{name:A.dataObj.moduleName,id:H.newId,ident:A.getIdentifier()});
			break;
			case"pageTitle":break;case"share":break;
			case"historizeTab":App.Tabs.processRemoveTab(H.id,H.to);break
		}
	}else{}
};
App.saveUserDataResponse=function(A){
	try{
		var B=A.responseText;
		if(B.substr(0,1)!="["){B="["+B+"]"}
		args=B.parseJSON();
		App.doResponseAction(args[0],args[1],args[2])
	}catch(C){}
	App.Request.hideThrobber();
	delete A;A=null
};
App.saveUserData=function(L,J){
	if(App.staticUniverse&&L!="lastAccess"){return false}
	App.Request.showThrobber();
	function G(){K="";var S=App.tabList.length;var R="";for(var T=0;T<S;T++){K+=R+App.tabList[T].dataObj.id;R=":"}return K}
	function C(U,T){
		if(typeof T=="undefined"){T=""}var R="";for(var V in U){if(typeof U.hasOwnProperty!="string"&&!U.hasOwnProperty(V)){continue}if(typeof U[V]=="function"){continue}if(V=="oldData"||V=="oldQuery"){continue}if(App.isOnSearch){if(V=="search"){if(J.extendSearch==0){var S=U[V]}else{var S=U.oldQuery}}else{if(J.moduleName=="Weather"&&V=="town"&&J.extendSearch==1){var S=U.oldData}else{var S=U[V]}}}else{var S=U[V]}R+="&arrData"+T+"["+V+"]="+encodeURIComponent(S)}return R
	}
	var K="";
	switch(L){
		case"module":
			var N=C(J.data);
			if(App.isOnSearch){var H=J.oldStatus}else{var H=J.status}
			K="id="+J.id+"&title="+encodeURIComponent(J.title)+"&tab="+J.tab+"&status="+H+"&col="+J.container+"&share="+J.share+N;
			break;
		case"tabdelete_mod":case"tabdelete":
			K="from="+J.from+"&to="+J.to;break;
		case"newtab_mod":
			var E=J[0];var F=J[1];
			J=E;K="tempid_tab="+J.id+"&title_tab="+encodeURIComponent(J.title)+"&sort_tab="+J.sort+"&icon_tab="+encodeURIComponent(J.icon)+"&cols_tab="+J.cols+"&columnSizes_tab="+J.columnSizes.join(",")+"&access_tab="+J.access;delete J;var O=F.length;
			var D=Math.random()*100000;
			for(var I=0;I<O;I++){
				J=F[I];J.dataObj.tempId=D+I;N=C(J.dataObj.data,"_mod"+I);if(typeof J.title=="undefined"){J.title=""}K+="&tempid_mod"+I+"="+J.dataObj.tempId+"&title_mod"+I+"="+encodeURIComponent(J.title)+"&name_mod"+I+"="+encodeURIComponent(J.name)+"&status_mod"+I+"=1&col_mod"+I+"="+J.dataObj.container+"&row_mod"+I+"="+J.dataObj.row+"&share_mod"+I+"=0"+N;App.moduleObjWaitingForId.push(J);delete J}
		break;
		case"tab":case"newtab":
			K="id="+J.id+"&title="+encodeURIComponent(J.title)+"&sort="+J.sort+"&icon="+encodeURIComponent(J.icon)+"&cols="+J.cols+"&columnSizes="+J.columnSizes.join(",")+"&access="+J.access+"&topic="+(J.topic||"");
		break;
		case"taborder":
			K="sort="+G();
		break;
		case"order":
			if(J.order){
				K+="col="+J.col+"&order="+J.order
			}else{
				var Q=App.LayoutManager.getModuleRow(J);
				if(Q<=0){
					K+="col="+J.dataObj.container+"&order="+App.LayoutManager.getResetColumnOrder(J)
				}else{J.dataObj.row=Q;K="id="+J.dataObj.id+"&col="+J.dataObj.container+"&row="+Q}
			}
		break;
		case"collapseExpand":
			K="modules="+encodeURIComponent(J.modules.join(","))+"&status="+J.status;
		break;
		case"history":
			K="id="+J.id+"&history="+encodeURIComponent(J.history);
		break;
		case"close":
			K="id="+J.dataObj.id;App.report("module.remove",{name:J.dataObj.moduleName,id:J.dataObj.id,ident:J.getIdentifier()});
		break;
		case"new":
			if(J.dataObj.campaignActive){
				var B={ecoId:(J.dataObj.ecoId||J.dataObj.widgetId),browser:Browser.name,browser_version:Browser.version,os:Browser.os,os_version:Browser.osVersion,screensize:screen.width+"x"+screen.height,locale:User.locale||App.locale};
				if(J.dataObj.fromQuery){B.query=J.dataObj.fromQuery}
				if(J.dataObj.subscribeType){B.subscribe=1}
				App.report("adc.spon.install",B);
				new Request().get("/proxy/ajaxProxy.php",{url:"http://api.eco.netvibes.com/pingcampaign/"+(J.dataObj.ecoId||J.dataObj.widgetId)})
			}
			var A=J.dataObj;
			var N=C(A.data);
			if(A.feedUrl){N+="&feedUrl="+encodeURIComponent(A.feedUrl)}
			var P=(A.title==null)?"":encodeURIComponent(A.title);
			var D=Math.random()*100000;
			J.dataObj.tempId=D;
			var M=(A.history==null)?"":encodeURIComponent(A.history);
			var Q=App.LayoutManager.getModuleRow(J);
			J.dataObj.row=Q;
			K="moduleRndId="+D+"&widgetId="+(A.widgetId||"")+"&title="+P+"&tab="+A.tab+"&status=1&history="+M+"&name="+A.moduleName+"&share="+A.share+"&col="+A.container+"&row="+Q+N;
			if(Q<=0){K+="&order="+App.LayoutManager.getResetColumnOrder(J)}
			if(J.dataObj.subscribeType){K+="subscribe="+J.dataObj.subscribeType}
			if(J.dataObj.subscription){App.subscribeTempId=D;J.dataObj.subscription=null}
			App.moduleObjWaitingForId.push(J);
		break;
		case"pageTitle":
			K="title="+encodeURIComponent(J);
		break;
		case"universe":
			K="brand="+encodeURIComponent(J);break;
		case"historizeModule":
			K="id="+J.id+"&deleted="+J.deleted;break;
		case"historizeTab":K="id="+J.from+"&deleted="+J.deleted+"&to="+J.to;break;
		case"deleteModule":K="id="+J;break;
		case"lastAccess":
			K="browser="+Browser.name;
			K+="&browser_version="+Browser.version;
			K+="&os="+Browser.os;
			K+="&os_version="+Browser.osVersion;
			K+="&screensize="+screen.width+"x"+screen.height;
		break
	}
	if(App.visit&&App.visit.id){K+="&visit="+App.visit.id}
	App.Request.sendPOST(NV_PATH+"ajax/save/userData.php","mode="+L+"&"+K,App.saveUserDataResponse)
};
App.serverVersion=null;
App.checkServerInterval=15000;
App.arriveTime=new Date();
App.lastStay=false;
App.sleepTime=0;
App.checkServerVersion=function(C){
	if(typeof C=="undefined"){C=false}
	var E="";
	var D=App.arriveTime.getTime();
	var A=(new Date()).getTime()-D;
	A=Math.ceil(A/1000);
	if(A<0||A>86400||D<1000000000000||App.arriveTime.getDate()!=(new Date).getDate()){
		A=App.checkServerInterval;App.arriveTime=new Date();D=App.arriveTime.getTime();App.lastStay=false;App.sleepTime=0
	}else{
		if(App.lastStay!==false&&Math.abs(A-App.lastStay)>900){App.sleepTime+=Math.abs(A-App.lastStay)}
	}
	App.lastStay=A;E+="&arrive="+Math.ceil(D/1000);E+="&stay="+(A-App.sleepTime);
	var B="anon";
	if(App.newUser){B="new"}else{if(App.registeredUser){B="reg"}}
	E+="&status="+B;
	if(App.visit&&App.visit.id){E+="&visit="+App.visit.id}
	App.Request.sendPOST(
		NV_PATH+"status.php",
		E,
		function(G){
			if(C){return false}
			var F="";
			try{F=G.responseXML.firstChild.firstChild.nodeValue}catch(H){return true}
			if(F=="reboot"){
				setTimeout(function(){location.href="/"},60000);
				alert(_("Netvibes will be upgrading the server in one minute.\nPlease finish your work and close the browser window."));
				if(App.checkServer){clearInterval(App.checkServer)}
				return true
			}
			if(!App.serverVersion){App.serverVersion=F;return true}if(F!=App.serverVersion){location.href=NV_PATH}
		}
	);
	if(App.checkServerInterval<120000){App.checkServerInterval=App.checkServerInterval*2}
	if(!C){window.setTimeout(App.checkServerVersion,App.checkServerInterval)}
};
window.setTimeout(App.checkServerVersion,App.checkServerInterval);;

//12
if(!App.Modules){App.Modules={}}
App.Modules.newModule=function(A,B){};
App.Modules.getById=function(C){
	for(var B=0,A=App.moduleList.length;B<A;B++){if(App.moduleList[B].dataObj.id==C){return App.moduleList[B]}}return null};
App.Modules.notifyResize=function(D){
	for(var C=0,A=App.moduleList.length;C<A;C++){
		var B=App.moduleList[C];
		if(!B.content||B.dataObj.tab!=App.selectedTab){continue}
		if(typeof B.content.resize=="function"){B.content.resize(D)}
	}
};
App.Modules.nativiseModule=function(B){
	if(B.moduleName=="UWA"&&B.data.moduleUrl){
		var D=B.data.moduleUrl.parseUrl();
		if(D.host=="www.netvibes.com"||D.host==NV_HOST){
			var F=D.path.split("/");
			if(F[1]=="modules"){
				var G=F[2].toLowerCase();
				for(var E in App.Modules){
					var A=App.Modules[E];
					if(typeof A!="object"||!A.defaultObj){continue}
					var C=A.defaultObj.moduleName.toLowerCase();
					if(C==G){
						B.moduleName=A.defaultObj.moduleName;
						B.data=String.parseQuery(D.query);
						if(B.data.title){B.data.title=B.data.title.replace(/\+/g," ")}
						return B
					}
				}
			}
		}
	}
	return B};
App.Modules.sortModulesByRow=function(G){
	var C=[];
	var F=[[],[],[],[]];
	for(var E=0,A=G.length;E<A;E++){var D=G[E];F[Math.max(D.dataObj.container-1,0)].push(D)}
	var H=false,D=null;
	for(var E=0;E<4;E=(E+1)%4){if(E==0){H=true}var B=F[E];if(B.length==0){if(E==3&&H){break}continue}H=false;C.push(B.shift())}
	return C};
App.Modules.cloneModule=function(B){
	var A=$unlink(B.dataObj);
	delete A.id;
	A.tab=App.selectedTab;
	A.isNew=true;
	var C=new Module(A).inject();
	App.ColManager["col"+A.container].insertBefore(C.elm_module,B.elm_module);
	C.load();
	App.moduleList.push(C);
	App.saveUserData("new",C)};
App.Modules.removeModule=function(B,A){};
App.Modules.printModule=function(C){
	var E=C.content.print();
	var B=$("print_target");
	if(!B){
		var D=document.createElement("iframe");
		D.style.width="1px";
		D.style.height="1px";
		D.style.border="0px";
		D.style.position="absolute";
		D.style.top="-10px";
		D.id="print_target";
		document.body.appendChild(D)
	}
	var A=function(){
		if(Browser.isIE){
			var F=$("print_target").contentWindow.document.body
		}else{var F=$("print_target").contentDocument.body}
		try{F.innerHTML=""}catch(H){window.setTimeout(A,100);return }
		if(Browser.isIE){
			var G=document.createElement("div");
			G.appendChild(E);
			F.innerHTML=G.innerHTML;
			window.setTimeout(function(){$("print_target").contentWindow.print()},200)
		}else{F.appendChild(E);$("print_target").contentWindow.print()}
		$("print_target").isLoaded=true
	};
	if(B.isLoaded){A()}else{if(Browser.isFirefox){B.onload=function(){A()}}else{A()}}
	return false};
App.Modules.LoadQueue={limit:5,timeout:null,selectedTabLoaded:false,items:[],loadingItems:[]};
App.Modules.LoadQueue.process=function(){
	if(this.timeout){clearTimeout(this.timeout)}
	while(this.loadingItems.length>0&&(typeof this.loadingItems[0]=="undefined"||this.loadingItems[0]=="undefined"||this.loadingItems[0].loaded)){
		this.loadingItems.splice(0,1)
	}
	if(this.loadingItems.length>this.limit){
		if(this.items.length>0){
			this.limit+=5;
			this.timeout=App.Modules.LoadQueue.process.delay(1000,this)
		}else{this.timeout=App.Modules.LoadQueue.process.delay(5000,this)}
		return false
	}
	if(this.items.length==0){return false}
	this.limit=5;
	while(this.items.length>0&&(typeof this.items[0]=="undefined"||this.items[0]=="undefined"||this.items[0].loaded)){
		this.items.splice(0,1)
	}
	var C=null;
	for(var B=0,A=this.items.length;B<A;B++){
		if(this.items[B].dataObj.tab==App.selectedTab){
			C=this.items[B];
			this.items.splice(B,1);
			C.onqueue=false;break
		}
	}
	if(!C){
		if(!this.selectedTabLoaded){
			this.selectedTabLoaded=true;
			this.timeout=App.Modules.LoadQueue.process.delay(1000,this);
			return 
		}
		do{
			if(this.items.length==0){return false}
			C=this.items.shift()
		}while(C.loading||C.loaded)
	}else{this.selectedTabLoaded=false}
	C.loadContent();
	this.timeout=App.Modules.LoadQueue.process.delay(100,this)};;

//13
App.Search={};
App.Search.attachEvents=function(){
	App.searchBox=$("globalSearch");
	if(!App.searchBox){return }
	App.searchBox.getElement("div").setStyles({position:"relative",zoom:"1"});
	App.searchBoxInput=App.searchBox.getElementsByTagName("input")[0];
	App.searchBoxForm=App.searchBox.getElementsByTagName("form")[0];
	App.searchBoxInput.value=_("In my page");
	App.searchBoxInput.setDefaultState=function(){this.className="text search defaultText";this.value=_("In my page");this.blur()};
	App.searchBoxInput.onfocus=function(){if(_("In my page")==this.value){App.searchBoxInput.value="";App.searchBoxInput.className="text search"}};
	App.searchBoxInput.onblur=function(){if(""==this.value){App.searchBoxInput.setDefaultState()}};
	App.searchBoxForm.onsubmit=function(){if(App.searchBoxInput.value!=App.query){App.searchInNetvibes(App.searchBoxInput.value)}return false};
	App.searchBoxClear=new Element("img",{src:App.getStaticUrl("/img/clear.gif"),title:_("Clear"),styles:{cursor:"pointer",position:"absolute",top:"0px",display:"none"}});
	App.searchBoxClear.setStyle(App.dirRTL?"left":"right","4px");
	if(Browser.Engine.trident){App.searchBoxClear.setStyle("top","4px")}
	App.searchBoxClear.injectAfter(App.searchBoxInput);
	App.searchBoxClear.onclick=function(){App.searchInNetvibes("");return false};
	App.isOnSearch=false;
	App.searchDone=false;
	App.dlaFilter=true;
	if(App.queryStart!=""){
		App.searchBoxInput.value=App.queryStart;
		App.searchBoxInput.className="text search";
		App.searchInNetvibes(App.queryStart)
	}
};
App.searchInNetvibes=function(D){
	$("tooltip").style.display="none";
	var C=App.moduleList.length;
	if(D==App.query){var A=true}else{var A=false}
	App.query=D;
	var B=App.selectedTab;
	if(D!=""){
		App.report("inpage.search",{query:D});
		if(!App.isOnSearch){
			App.isOnSearch=true;
			Element.addClassName(document.body,"search");
			App.searchBoxClear.style.display="inline";
			App.searchBoxClear.disabled="";
			for(var F=0;F<C;F++){
				if(!App.moduleList[F].content){continue}
				if(parseInt(App.moduleList[F].dataObj.oldStatus,10)!=1&&parseInt(App.moduleList[F].dataObj.oldStatus,10)!=0){
					App.moduleList[F].dataObj.oldStatus=parseInt(App.moduleList[F].dataObj.status,10)
				}
				try{
					if(!App.searchDone&&typeof App.moduleList[F].dataObj.extendSearch=="number"){
						App.moduleList[F].dataObj.extendSearch=(App.dlaFilter)?0:1
					}
					if(typeof App.moduleList[F].content.doSearch=="function"){
						App.moduleList[F].content.doSearch(D)
					}else{App.moduleList[F].hide(true)}
				}catch(E){}
			}
			App.searchDone=true
		}else{
			if(App.searchDone){
				var C=App.moduleList.length;
				for(var F=0;F<C;F++){
					if(!App.moduleList[F].content){continue}
					try{
						if(typeof App.moduleList[F].dataObj.extendSearch=="number"){
							App.moduleList[F].dataObj.extendSearch=(App.dlaFilter)?0:1;
							App.moduleList[F].content.doSearch(App.query)
						}else{
							if(!A){
								if(typeof App.moduleList[F].content.doSearch=="function"){
									App.moduleList[F].content.doSearch(D)
								}
							}
						}
					}catch(E){}
				}
			}
		}
	}else{
		if(document.location.search&&document.location.search.indexOf("?q=")!=-1){
			document.location.search=""
		}else{
			App.isOnSearch=false;
			App.searchDone=false;
			Element.removeClassName(document.body,"search");
			App.searchBoxClear.style.display="none";
			App.searchBoxInput.setDefaultState();
			for(var F=0;F<C;F++){
				if(!App.moduleList[F].content){continue}
				App.moduleList[F].dataObj.status=App.moduleList[F].dataObj.oldStatus;
				App.moduleList[F].dataObj.oldStatus=-1;
				try{
					if(typeof App.moduleList[F].content.doSearch=="function"){
						App.moduleList[F].content.doSearch("");
						if(typeof App.moduleList[F].dataObj.data.oldQuery=="string"){
							App.moduleList[F].dataObj.data.oldQuery=""
						}
					}
					App.moduleList[F].restoreStatus()
				}catch(E){}
			}
		}
	}
};;

//14
var ModalDialog=new Class({
	Implements:Options,
	options:{
		className:"modalDialog nv-settings",overlayClassName:"overlay_dialog",showCenter:true,showCloseButton:true,showTitle:true,minWidth:300,minHeight:200,width:650,height:450,zoomEffect:null,fadeEffect:false,onClosed:$empty},
	initialize:function(C,A){
		this.setOptions(A);this.container=$(C);if(!this.container){this.container=new Element("div");this.container.setAttribute("id",C);this.container.className=this.options.className;this.container.style.display="none";this.container.style.position="absolute";this.container.style.zIndex=9000;document.body.appendChild(this.container)}if(this.options.showTitle){this.heading=document.createElement("h1");this.container.appendChild(this.heading)}if(this.options.showCloseButton){var B=Netvibes.UI.createIcon("actions-window-close close",_("Close"),16,16);this.container.appendChild(B);Event.observe(B,"click",this.hide.bindAsEventListener(this))}this.eventResize=this.onResized.bindAsEventListener(this);Event.observe(window,"resize",this.eventResize.bindAsEventListener(this));if(Browser.isOpera&&Browser.version<9){this.options.fadeEffect=false}},
	disableScreen:function(E){
		var B=$("nv-overlay");if(!B){B=document.createElement("div");B.setAttribute("id","nv-overlay");B.className=this.options.overlayClassName;B.style.display="none";B.style.position="absolute";B.style.top="0";B.style.left="0";Event.observe(B,"click",this.hide.bindAsEventListener(this));document.body.appendChild(B)}var C=Browser.getDocumentWidth();var A=Browser.getDocumentHeight();if(A<Browser.getClientHeight()){A=Browser.getClientHeight()}B.style.width=C+"px";B.style.height=A+"px";if(Browser.isOpera&&Browser.version<9){B.style.background="none"}if(!E&&this.options.fadeEffect){$(B).setOpacity(0);Element.show(B);var D=new Fx.Morph(B,{duration:200,wait:false});D.start({opacity:[0,0.6]}).chain(function(){this._showDialog()}.bind(this))}else{Element.show(B)}},
	enableScreen:function(){
		var A=$("nv-overlay");Event.stopObserving(A,"click",this.hide);if(this.options.fadeEffect){var B=new Fx.Styles(A,{duration:200,wait:false});B.start({opacity:0}).chain(function(){this.hidding=false;A.remove()}.bind(this))}else{A.remove()}},
	fixIEOverlapping:function(){
		Position.clone(this.container,this.iefix);this.iefix.style.zIndex=this.container.style.zIndex-1;Element.show(this.iefix)},
	show:function(){
		if(this.showing||this.hidding){return }this.showing=true;this.disableScreen();if(!this.options.fadeEffect){this._showDialog()}},
	_showDialog:function(){
		if(this.options.showCenter){this._centerDialog()}if(!this.iefix&&Browser.isIE&&(navigator.userAgent.indexOf("Opera")<0)){this.container.insertAdjacentHTML("afterEnd",'<iframe id="'+this.container.id+'_iefix" style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" src="javascript:false;" frameborder="0" scrolling="no"></iframe>');this.iefix=$(this.container.id+"_iefix")}if(this.iefix){setTimeout(this.fixIEOverlapping.bind(this),50)}if(Browser.isIE&&Browser.version<7){$$("select").each(function(A){if(Element.visible(A)&&A.id!="optionUnreadPosition"){A.setAttribute("autohide","autohide");Element.show(A)}})}if(typeof this.onShow=="function"){this.onShow()}Element.show(this.container);this.showing=false},
	hide:function(){
		if(this.showing||this.hidding){return }this.hidding=true;Element.hide(this.container);if(typeof this.onClose=="function"){this.onClose()}if(this.iefix){Element.hide(this.iefix)}if(Browser.isIE&&Browser.version<7){$$("select").each(function(A){if(A.getAttribute("autohide")=="autohide"){A.setAttribute("autohide","");Element.show(A)}})}this.enableScreen();this.options.onClosed();if(!this.options.fadeEffect){this.hidding=false}},
	isVisible:function(){
		return Element.visible(this.container)},
	setTitle:function(A){if(this.heading){this.heading.innerHTML=A}},
	setPlacement:function(D,C,B,A){
		if(D<0){D=0}if(C<0){C=0}if(B<this.options.minWidth){B=this.options.minWidth}if(A<this.options.minHeight){A=this.options.minHeight}Element.setStyle(this.container,{top:D+"px",left:C+"px",width:B+"px"})},
	updatePlacement:function(A){if(this.options.showCenter){this._centerDialog()}this.disableScreen(A)},
	onResized:function(A){if(this.isVisible()){this.updatePlacement(A)}},
	onScroll:function(A){if(this.isVisible()){this.disableScreen(A)}},
	setSize:function(B,A){
		this.options.width=B;this.options.height=A;this.container.style.width=this.options.width+"px";this.container.style.height=this.options.height+"px";this.updatePlacement()},
	_centerDialog:function(){
		var B=Element.getDimensions(this.container);var C=this.options.width;var A=B.height;var F=Browser.getScrollTop();var E=(Browser.getClientHeight()-A)/2+Browser.getScrollTop()+F;var D=(Browser.getClientWidth()-C)/2+Browser.getScrollLeft();this.setPlacement(E/2,D,C,A)},
	destroy:function(){
		this.container.destroy();Event.stopObserving(window,"resize",this.eventResize);Event.stopObserving(window,"scroll",this.eventResize)}
});
	
var Overlay=new Class({
	Implements:[Events,Options],
	options:{className:"overlay_dialog",fadeEffect:true,opacity:0.6,duration:200,hideOnClick:true},
	initialize:function(A){
		this.setOptions(A);this.elm=$("nv-overlay");if(!this.elm){this.elm=new Element("div",{id:"nv-overlay","class":this.options.className,styles:{display:"none",position:"absolute",top:0,left:0}}).inject(document.body);if(this.options.hideOnClick){this.elm.addEvent("click",this.hide.bindWithEvent(this))}this.adapt();var B=this.adapt.bind(this);$(window).addEvent("scroll",B);$(window).addEvent("resize",B);this.addEvent("hide",function(){$(window).removeEvent("resize",B);$(window).removeEvent("scroll",B)})}if(Browser.isOpera&&Browser.version<9){this.elm.style.background="none"}return this},
	adapt:function(C){
		if(C){C.stop()}var B=Browser.getDocumentWidth();var A=Browser.getDocumentHeight();if(A<Browser.getClientHeight()){A=Browser.getClientHeight()}this.elm.setStyles({width:B+"px",height:A+"px"});return this},
	show:function(B){
		if(B){B.stop()}if(Browser.isIE&&Browser.version<7){$A(document.getElementsByTagName("select")).each(function(C){if(Element.visible(C)&&C.id!="optionUnreadPosition"){C.setAttribute("autohide","autohide");Element.show(C)}})}if(App.userCustom.enableFx=="1"&&this.options.fadeEffect){this.elm.setOpacity(0);this.elm.show();var A=new Fx.Morph(this.elm,{duration:this.options.duration,wait:false});A.start({opacity:[0,this.options.opacity]}).chain(function(){this.fireEvent("show")}.bind(this))}else{this.elm.show();this.fireEvent("show")}return this},
	hide:function(B){
		if(B){B.stop()}if(Browser.isIE&&Browser.version<7){$A(document.getElementsByTagName("select")).each(function(C){if(C.getAttribute("autohide")=="autohide"){C.setAttribute("autohide","");Element.show(C)}})}if(App.userCustom.enableFx=="1"&&this.options.fadeEffect){var A=new Fx.Morph(this.elm,{duration:this.options.duration,wait:false});A.start({opacity:[this.options.opacity,0]}).chain(function(){this.elm.destroy();this.fireEvent("hide")}.bind(this))}else{this.elm.destroy();this.fireEvent("hide")}return this}
});;

//15
App.Keyboard={};
App.moduleFocus=null;App.keyboardFocus=null;
App.addKeyboardFocus=function(A,B){
	if(typeof B=="undefined"){B="#aaa"}if(typeof A=="number"){A=App.moduleList[A].elm_module}if(!A){return false}Element.addClassName(A,"kbdFocus");App.appScroll(A)};
App.removeKeyboardFocus=function(A){
	if(typeof A=="number"){if(!App.moduleList[A]){return false}A=App.moduleList[A].elm_module}if(!A){return false}Element.removeClassName(A,"kbdFocus")};
var helpDiv=null;var oldHelpMsg="";App.keyboardBuffer="";
App.keyboardHandler=function(S){
	S=new Event(S);
	if(S.control){return true}
	if(S.meta){return true}
	if(S.key=="f5"){return true}
	var H=(S.target&&S.target.tagName)?S.target.tagName.toLowerCase():"";
	if(H=="input"||H=="textarea"){
		if(S.key!="esc"){return true}
		if(App.isOnSearch){App.searchInNetvibes("")}
		S.target.blur();
		return Q(S)
	}
	if(S.key>="a"&&S.key<="z"){App.keyboardBuffer+=S.key}
	if(App.keyboardBuffer.substr(App.keyboardBuffer.length-2)=="kb"){
		if(typeof App.userCustom.keyboardNav=="undefined"||App.userCustom.keyboardNav=="0"){
			App.userCustom.keyboardNav="1";
			window.status="Keyboard navigation turned on."
		}else{
			App.userCustom.keyboardNav="0";
			window.status="Keyboard navigation turned off.";
			var I=O();
			if(I){I.switchTo()}
		}
		if($("optionEnableShortcuts")){$("optionEnableShortcuts").checked=(App.userCustom.keyboardNav==1)}
		App.keyboardBuffer="";
		App.saveUserCustom();
		return false
	}
	if(typeof App.userCustom.keyboardNav=="undefined"||App.userCustom.keyboardNav=="0"||App.staticUniverse){
		if(S.key!="esc"){return true}
	}
	function F(){if(helpDiv){helpDiv.style.display="none"}}
	App.shortcutsHelp=function(U,V){N(U,V)};
	function N(U,W){
		if(!helpDiv){
			helpDiv=document.createElement("div");
			helpDiv.id="help";
			helpDiv.close=function(){helpDiv.style.display="none"};
			helpDiv.onclick=function(){helpDiv.close()};
			var X=document.createElement("div");
			X.className="innerHelp";
			helpDiv.appendChild(X);
			document.body.appendChild(helpDiv)
		}
		W="\n"+W;W=W.replace(/\n/g,"<br />\n");W=W.replace(/\n(.+)\t+/g,"\n<b>$1</b> - ");
		W="<p class='inputPageTitle'>"+_("Netvibes keyboard shortcuts")+"</p><p style='margin:10px 0 0 0'>"+_("Keyboard shortcut in this context")+" ("+U+"):</p><div>"+W+"</div>";
		if(oldHelpMsg==W){helpDiv.style.display=(helpDiv.style.display=="none")?"block":"none";return false}
		oldHelpMsg=W;helpDiv.firstChild.innerHTML=W;helpDiv.style.display="block";
		var V=Netvibes.UI.createIcon("actions-window-close",_("Close"),13,15);
		Element.addClassName(V,"close");
		V.onclick=function(){helpDiv.close()};
		helpDiv.appendChild(V)
	}
	function M(U){App.addKeyboardFocus(U)}
	function K(U){App.removeKeyboardFocus(U)}
	function Q(U){
		if(U.preventDefault&&typeof U.preventDefault=="function"){U.preventDefault()}
		if(U.returnValue){U.returnValue=false}
		window.status="Keyboard focus is on: "+App.keyboardFocus;
		Event.stop(U);
		return false
	}
	function E(U){
		var V=App.tabList.length;
		if(U>=V){return }
		I=App.tabList[U];
		if(App.moduleFocus){K(App.moduleFocus)}
		App.moduleFocus=null;
		I.switchTo()
	}
	function R(Y){
		var X=App.tabList.length;var V=null,U=App.tabList[0],W=App.tabList[X-1];for(var Z=0;Z<X;Z++){if(App.tabList[Z].dataObj.id==App.selectedTab){V=App.tabList[Z];continue}if(V==null){W=App.tabList[Z]}if(V!=null){U=App.tabList[Z];break}}if(App.moduleFocus){K(App.moduleFocus)}App.moduleFocus=null;switch(Y){case -1:W.switchTo();break;case 1:U.switchTo();break}}
	function C(){return R(1)}
	function O(){return R(-1)}
	function T(p){
		var a=[];
		var Z={};
		var b={};
		for(var X=0;X<App.moduleList.length;X++){Z[App.moduleList[X].dataObj.id]=X}
		var q=false;
		for(var X=1;X<=4;X++){
			var W=App.ColManager["col"+X];var Y=W.childNodes.length;var r=[];for(var l=0;l<Y;l++){var d=W.childNodes[l].dataObj;if(!d||!d.id){continue}var n=Z[d.id];var k=App.moduleList[n];if(k.dataObj.tab!=App.selectedTab){continue}b[n]={col:a.length,mod:r.length};if(App.moduleFocus!=null&&App.moduleFocus==n){q=true}if(k.dataObj.moduleName=="WebSearch"){if(k.content&&typeof k.content.removeFocus=="function"){k.content.removeFocus()}}r.push(n)}if(r.length==0){continue}a.push(r)
		}
		if(p.alt||p.meta){return false}
		if(!p.shift){
			var g;
			switch(p.key){
				case"f":App.keyboardFocus="searchInNetvibes";App.searchBoxInput.focus();return Q(p);
				case"a":App.keyboardFocus="addcontent";App.Sidebar.openCloseSelection();return Q(p);
				case"s":App.keyboardFocus="settings";SettingsPanel.open();return Q(p);
				case"j":g=O();return Q(p);
				case"k":g=C();return Q(p);
				case"t":App.keyboardFocus="tab";return Q(p);
				case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":E(Number(p.key)-1);return Q(p);
				case"h":case"f1":N(_("Module"),'<table><tr><td><img src="'+NV_PATH+'img/keys/left.png" alt="'+_("Left")+'" title="'+_("Left")+'"/>, <img src="'+NV_PATH+'img/keys/right.png" alt="'+_("Right")+'" title="'+_("Right")+'"/>, <img src="'+NV_PATH+'img/keys/up.png" alt="'+_("Up")+'" title="'+_("Up")+'"/>, <img src="'+NV_PATH+'img/keys/down.png" alt="'+_("Down")+'" title="'+_("Down")+'"/></td><td>'+_("Navigate through modules")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/enter.png" alt="Enter" title="Enter"/></td><td>'+_("Do action on module (feed and webnote)")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/e.png" alt="E" title="E"/></td><td>'+_("Edit module")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/r.png" alt="R" title="R"/></td><td>'+_("Refresh module")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/d.png" alt="D" title="D"/></td><td>'+_("Delete module")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/1.png" alt="1" title="1"/>,<img src="'+NV_PATH+'img/keys/2.png" alt="2" title="2"/>,...,<img src="'+NV_PATH+'img/keys/0.png" alt="0" title="0"/></td><td>'+_("Switch to tab 1 to 10")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/j.png" alt="J" title="J"/>, <img src="'+NV_PATH+'img/keys/k.png" alt="K" title="K"/></td><td>'+_("Navigate through tabs")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/f.png" alt="F" title="F"/></td><td>'+_("Search in my page")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/s.png" alt="S" title="S"/></td><td>'+_("Settings")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/t.png" alt="T" title="T"/> '+_("then")+' <img src="'+NV_PATH+'img/keys/h.png" alt="H" title="H"/></td><td>'+_("Tab help")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/a.png" alt="A" title="A"/></td><td>'+_("Add content")+"</td></tr></table>");return Q(p);
				case"left":case"right":case"up":case"down":case"enter":case"p":case"r":case"n":case"u":case"e":case"d":case"m":break;
				case"esc":
					F();
					if($("shareModuleBalloon")){Element.remove($("shareModuleBalloon"))}
					if(App.isOnSearch){try{App.searchInNetvibes("")}catch(p){}}
					if(App.moduleFocus){K(App.moduleFocus)}
					return Q(p);
				default:return true;return Q(p)
			}
			if(App.moduleFocus==null||!q){
				if(App.moduleFocus){K(App.moduleFocus)}if(typeof a!="undefined"&&typeof a[0]!="undefined"&&typeof a[0][0]!="undefined"){App.moduleFocus=a[0][0];M(App.moduleFocus)}return Q(p)
			}
			function V(e){if(oldFocus==e){return true}if(!App.moduleList[e]){return false}App.moduleFocus=e;K(oldFocus);M(e)}
			function j(){window.scrollTo(0,0)}
			function o(e){return(e<=0)?e=a.length-1:e-1}
			function U(e){return(e+1>=a.length)?0:e+1}
			oldFocus=App.moduleFocus;c=b[oldFocus];
			switch(p.key){
				case"left":case"right":var f=findPosY(App.moduleList[oldFocus].elm_module);if(p.key=="right"){c.col=U(c.col)}else{c.col=o(c.col)}var h=0;for(var X=0;X<a[c.col].length;X++){k=App.moduleList[a[c.col][X]].elm_module;y=findPosY(k);if(h<=f&&f<=y+k.offsetHeight){c.mod=X;break}h=y}if(c.mod>=a[c.col].length){c.mod=a[c.col].length-1}V(a[c.col][c.mod]);return Q(p);
				case"up":if(c.mod-1<0){c.col=o(c.col);c.mod=a[c.col].length-1}else{c.mod-=1}V(a[c.col][c.mod]);return Q(p);
				case"n":
				case"down":if(c.mod+1>=a[c.col].length){c.col=U(c.col);c.mod=0}else{c.mod+=1}V(a[c.col][c.mod]);return Q(p);
				case"enter":k=App.moduleList[App.moduleFocus];if(k.content.onKeyboardEnter){App.keyboardFocus="module.action";k.content.onKeyboardEnter();F()}return Q(p);
				case"p":k=App.moduleList[App.moduleFocus];k.publish(k);return Q(p);
				case"r":k=App.moduleList[App.moduleFocus];if(k.refreshMode){k.refresh(p)}return Q(p);
				case"u":k=App.moduleList[App.moduleFocus];if(typeof k.content.setAllAsReadOnMouseDown=="function"){k.content.setAllAsReadOnMouseDown()}return Q(p);
				case"e":App.keyboardFocus="module.edit";k=App.moduleList[App.moduleFocus];k.showEdit();k.elm_editContent.getElementsByTagName("input")[0].focus();App.keyboardFocus="module.edit";return Q(p);
				case"d":k=App.moduleList[App.moduleFocus];if(k.onClosing()){App.moduleFocus=null}return Q(p);
				case"s":k=App.moduleList[App.moduleFocus];var Y=App.tabList.length;var g=App.selectedTabObj;if(g.dataObj.access!="shared"&&g.dataObj.access!="public"){return Q(p)}return Q(p);default:
			}
			return true
		}else{
			if(App.moduleFocus==null){return false}k=App.moduleList[App.moduleFocus];switch(p.key){case"a":if(k.dataObj.moduleName=="RssReader"){k.content.setAllAsReadOnMouseDown()}return Q(p);case"u":if(k.dataObj.moduleName=="RssReader"){k.content.setAllAsUnRead()}return Q(p);case"left":App.LayoutManager.movePositionLeft(k);App.appScroll(k.elm_module);return Q(p);case"right":App.LayoutManager.movePositionRight(k);App.appScroll(k.elm_module);return Q(p);case"up":App.LayoutManager.movePositionUp(k);App.appScroll(k.elm_module);return Q(p);case"down":App.LayoutManager.movePositionDown(k);App.appScroll(k.elm_module);return Q(p);case"b":App.LayoutManager.movePositionBottom(k);App.appScroll(k.elm_module);return Q(p);case"c":k.collpaseExpand();return Q(p);case"d":App.Modules.cloneModule(k);return Q(p);case"t":App.LayoutManager.movePositionTop(k);App.appScroll(k.elm_module);return Q(p);case"m":case"esc":F();App.keyboardFocus="module";App.retainKeyboardFocus();return Q(p)}return true
		}
	}
	function A(U){
		switch(U.key){case"h":case"f1":N(_("Add content"),'<table><tr><td><img src="'+NV_PATH+'img/keys/esc.png" alt="Escape" title="Escape"/></td><td>'+_("Close window")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/e.png" alt="E" title="E"/></td><td>'+_("Go to the netvibes ecosystem")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/a.png" alt="A" title="A"/></td><td>'+_("Add a feed")+"</td></tr></table>");return Q(U);case"a":App.Sidebar.openAddNewFeed();return Q(U);case"esc":F();App.keyboardFocus="module";App.Sidebar.close();App.retainKeyboardFocus();return Q(U)}return true}
	function J(Y){
		var X=App.tabList.length;var W=App.selectedTabObj;var V=0;switch(Y.key){case"h":case"f1":if(App.keyboardFocus=="tab.edit"){return Q(Y)}N(_("Tab"),'<table><tr><td><img src="'+NV_PATH+'img/keys/t.png" alt="T" title="T"/> '+_("then")+' <img src="'+NV_PATH+'img/keys/n.png" alt="N" title="N"/></td><td>'+_("New tab")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/t.png" alt="T" title="T"/> '+_("then")+' <img src="'+NV_PATH+'img/keys/d.png" alt="D" title="D"/></td><td>'+_("Delete tab")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/t.png" alt="T" title="T"/> '+_("then")+' <img src="'+NV_PATH+'img/keys/r.png" alt="R" title="R"/></td><td>'+_("Rename tab")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/t.png" alt="T" title="T"/> '+_("then")+' <img src="'+NV_PATH+'img/keys/o.png" alt="O" title="O"/></td><td>'+_("Tab options")+"</td></tr></table>");return Q(Y);case"n":if(Y.alt||Y.control||Y.meta){break}if(App.keyboardFocus=="tab"){NewPageTab()}return Q(Y);case"r":if(Y.alt||Y.control||Y.meta){break}if(App.keyboardFocus=="tab"){W.rename()}return Q(Y);case"o":if(App.keyboardFocus=="tab"){W.showTabOptions()}return Q(Y);case"d":if(App.keyboardFocus=="tab.edit"){break}W.remove(Y);App.keyboardFocus="module";return Q(Y);case"t":if(Y.alt||Y.control||Y.meta){break}return Q(Y);case"left":case"right":default:if(App.keyboardFocus=="tab.edit"){return Q(Y)}case"esc":if(App.keyboardFocus=="tab.edit"){if(App.tabEditing!=-1){var U=$(App.tabEditing);if(U&&U.firstChild&&U.firstChild.onblur){U.firstChild.onblur(U.firstChild)}}}case"enter":if(tabOptions&&tabOptions.style.visibility!="hidden"){tabOptions.style.visibility="hidden"}App.retainKeyboardFocus();App.keyboardFocus="module";return Q(Y)}return true}
	function L(U){
		switch(U.key){case"esc":App.keyboardFocus="module";SettingsPanel.close();App.retainKeyboardFocus();return Q(U)}return true}
	function D(U){
		switch(U.key){case"esc":App.keyboardFocus="addcontent";App.Sidebar.removeModuleBox();App.retainKeyboardFocus();return Q(U)}return true}
	function P(a){
		var V=0;switch(a.key){case"a":var W=$("FeedreaderReadAll");if(W){W.onclick()}return Q(a);case"h":case"f1":N("Feedreader",'<table><tr><td><img src="'+NV_PATH+'img/keys/esc.png" alt="Esc" title="Esc"/></td><td>'+_("Close open Netvibes windows")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/p.png" alt="P" title="P"/></td><td>'+_("Previous message")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/n.png" alt="N" title="N"/></td><td>'+_("Next message")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/up.png" alt="'+_("Up")+'" title="'+_("Up")+'"/></td><td>'+_("Previous message")+" "+_("(with scroll in content)")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/down.png" alt="'+_("Down")+'" title="'+_("Down")+'"/></td><td>'+_("Next message")+" "+_("(with scroll in content)")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/space.png" alt="'+_("Space")+'" title="'+_("Space")+'"/></td><td>'+_("Next unread message")+" "+_("(with scroll)")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/u.png" alt="U" title="U"/></td><td>'+_("Mark item as read/unread")+'</td></tr><td><img src="'+NV_PATH+'img/keys/a.png" alt="A" title="A"/></td><td>'+_("Read All")+'</td></tr><tr><td><img src="'+NV_PATH+'img/keys/shift.png" alt="SHIFT" title="SHIFT"/> + <img src="'+NV_PATH+'img/keys/u.png" alt="U" title="U"/></td><td>'+_("Unread All")+"</td></tr></table>");return Q(a);case"i":$("btShowPage").onclick();return Q(a);case"u":if(a.shift){var W=$("FeedreaderUnReadAll");if(W){W.onclick()}return Q(a)}case"p":case"up":if(V==0&&(a.key=="p"||a.key=="up")){V=-1}case"space":if(V==0&&a.key=="space"){V=2;var Z=$("feedReaderContentFrame").parentNode;var Y=(Z.firstChild.scrollTop+Element.getDimensions(Z.firstChild).height)>=Z.firstChild.scrollHeight;if(!Y){var U=Z.firstChild.scrollTop+Math.floor(Element.getDimensions(Z.firstChild).height*0.8);App.smoothScroll(Z.firstChild,U);return Q(a)}}case"n":case"down":if(V==0&&(a.key=="n"||a.key=="down")){V=1}if(a.key=="up"){var Z=$("feedReaderContentFrame").parentNode;var b=(Z.firstChild.scrollTop==0);if(!b){var U=Z.firstChild.scrollTop-Math.floor(Element.getDimensions(Z.firstChild).height*0.8);if(U<0){U=0}App.smoothScroll(Z.firstChild,U);return Q(a)}}if(a.key=="down"){var Z=$("feedReaderContentFrame").parentNode;var Y=(Z.firstChild.scrollTop+Element.getDimensions(Z.firstChild).height)>=Z.firstChild.scrollHeight;if(!Y){var U=Z.firstChild.scrollTop+Math.floor(Element.getDimensions(Z.firstChild).height*0.8);App.smoothScroll(Z.firstChild,U);return Q(a)}}this.onBottom=function(){return(Z.childNodes[1].scrollTop+Element.getDimensions(Z.childNodes[1]).height)>=Z.childNodes[1].scrollHeight};var X=$("feedReaderHeadlinesFrame").firstChild;do{if(X.getAttribute("isSelected")&&X.getAttribute("isSelected")==1){break}}while(X=X.nextSibling);if(!X){X=$("feedReaderHeadlinesFrame").firstChild}else{switch(V){case -1:X=X.previousSibling;break;case 1:X=X.nextSibling;break;case 2:X=X.nextSibling;do{if(X&&Element.hasClassName(X,"unread")){break}if(!X||!X.nextSibling){X=null;break}}while(X=X.nextSibling);break}}if(X){if(V==0){X.onclick(X,true)}else{X.onclick(X)}}return Q(a);case"esc":App.FeedReader.close();App.keyboardFocus="module";App.retainKeyboardFocus();F();return Q(a)}return true}
	function G(U){
		switch(U.key){case"esc":App.keyboardFocus="module";if(App.moduleFocus!=null){App.moduleList[App.moduleFocus].endEditMode()}App.retainKeyboardFocus();return Q(U)}return true}
	function B(U){
		m=App.moduleList[App.moduleFocus];if(m&&typeof m.content.onKeyboardAction=="function"){return m.content.onKeyboardAction(U.key)}return true}
	if(App.keyboardFocus&&App.keyboardFocus.indexOf("edit")==-1&&App.keyboardFocus!="module.action"){
		if(SettingsPanel.isOpen()){
			App.keyboardFocus="settings"
		}else{
			if(App.FeedReader.isOpen&&(!App.keyboardFocus||App.keyboardFocus.substr(0,10)!="feedreader")){App.keyboardFocus="feedreader"}
		}
	}
	if(helpDiv&&helpDiv.style.display=="block"){
		F();
		if(App.keyboardFocus=="tab.edit"){App.keyboardFocus="module"}
		if(S.key=="esc"||S.key=="h"||S.key=="f1"){return Q(S)}
	}
	window.status="Keyboard focus is on: "+App.keyboardFocus;
	switch(App.keyboardFocus){
		case"addcontent":if(!A(S)){return false}break;
		case"addcontent.edit":
		case"addcontent.feed":if(!D(S)){return false}break;
		case"feedreader":if(!P(S)){return false}break;case"tab.edit":
		case"tab":if(!J(S)){return false}break;
		case"settings":if(!L(S)){return false}break;
		case"module.edit":if(!G(S)){return false}break;
		case"module.action":if(!B(S)){return false}break;
		case"edit":break;
		case"module":
		case"searchInNetvibes":
		default:
			if(!T(S)){return false}
			break
	}
	switch(S.key){
		case"esc":
			App.keyboardFocus="module";
			App.FeedReader.close();
			App.Sidebar.close();
			if($("shareModuleBalloon")){Element.remove($("shareModuleBalloon"))}
			if(tabOptions){tabOptions.style.visibility="hidden"}
			F();
			if(App.moduleFocus){K(App.moduleFocus);App.moduleFocus=null}
			App.retainKeyboardFocus();
			return Q(S)
	}
};

App.retainKeyboardFocus=function(){
	if(document.focus){document.focus()}else{if(document.body.focus){document.body.focus()}else{if(window.focus){window.focus()}}}};
var smoothScrollToTimeout;
App.smoothScroll=function(C,A){
	if(C=="all"){if(Browser.isSafari){var C=document.body}else{var C=document.documentElement}}
	window.clearTimeout(smoothScrollToTimeout);
	var E;
	var D=C.scrollTop;
	var B=0;
	scrollToValue=function(){
		B=B+1;
		if(B>15){
			window.clearTimeout(smoothScrollToTimeout)
		}else{
			var F=B/15;
			y=Math.floor((A-D)*(Math.cos((F-1)*3.1416)+1)/2);
			C.scrollTop=D+y;
			smoothScrollToTimeout=window.setTimeout(scrollToValue,40)
		}
	};
	smoothScrollToTimeout=window.setTimeout(scrollToValue,40)};
App.appScroll=function(A){
	if(Browser.isSafari){var D=document.body}else{var D=document.documentElement}
	var C=D.scrollTop;
	var E=findPosY(A);
	var B=Element.getDimensions(A).height;
	var F;
	if(self.innerHeight){F=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){F=D.clientHeight}else{if(document.body){F=document.body.clientHeight}}}
	if(E-C+B>F-25){App.smoothScroll("all",E+B-F+60)}else{if(E-C<25){App.smoothScroll("all",E-60)}}};;

//16
App.Drag={
	scrollPos:null,obj:null,
	init:function(C,D,B){
		if(B==null){C.onmousedown=App.Drag.start}
		C.root=D;
		if(isNaN(parseInt(C.root.style.left))){C.root.style.left="0px"}
		if(isNaN(parseInt(C.root.style.top))){C.root.style.top="0px"}
		C.root.onDragStart=new Function();
		C.root.onDragEnd=new Function();
		C.root.onDrag=new Function();
		if(B!=null){
			var A=App.Drag.obj=C;B=App.Drag.fixE(B);
			var F=parseInt(A.root.style.top);
			var E=parseInt(A.root.style.left);
			A.root.onDragStart(E,F,B.clientX,B.clientY);
			A.lastMouseX=B.clientX;A.lastMouseY=B.clientY;
			document.onmousemove=App.Drag.drag;
			document.onmouseup=App.Drag.end
		}
	},
	start:function(B){
		B=App.Drag.fixE(B);
		if(B.which==3||(B.button==2)){return true}
		var A=App.Drag.obj=this;var D=parseInt(A.root.style.top);var C=parseInt(A.root.style.left);
		A.root.onDragStart(C,D,B.clientX,B.clientY);A.lastMouseX=B.clientX;A.lastMouseY=B.clientY;
		document.onmousemove=App.Drag.drag;document.onmouseup=App.Drag.end;
		App.Drag.scrollPos=App.scrollPos();
		return false
	},
	drag:function(I){
		I=App.Drag.fixE(I);var H=App.Drag.obj;var G=I.clientY;var F=I.clientX;var E=parseInt(H.root.style.top);var D=parseInt(H.root.style.left);var B,C;B=D+F-H.lastMouseX;C=E+G-H.lastMouseY;var A=App.scrollPos();C-=App.Drag.scrollPos-A;App.Drag.scrollPos=A;H.root.style.left=B+"px";H.root.style.top=C+"px";H.lastMouseX=F;H.lastMouseY=G;H.root.onDrag(B,C,I.clientX,I.clientY);return false
	},
	end:function(){
		document.onmousemove=null;document.onmouseup=null;
		App.Drag.obj.root.onDragEnd(parseInt(App.Drag.obj.root.style.left),parseInt(App.Drag.obj.root.style.top));
		App.Drag.obj=null
	},
	fixE:function(A){
		if(typeof A=="undefined"){A=window.event}
		if(typeof A.layerX=="undefined"){A.layerX=A.offsetX}
		if(typeof A.layerY=="undefined"){A.layerY=A.offsetY}
		return A
	}
};;

//17
var Module=new Class({
	Implements:[Events,Options],
	options:{confirmOnClose:true,nativise:false,editable:true,preview:false,draggable:false},
	initialize:function(B,A){
		this.setOptions(A);
		if(!B.tab){B.tab=App.selectedTab}
		this.dataObj=B;
		if(!App.Modules[B.moduleName+"Infos"]){
			return false
		}
		this.editMode=false;this.loaded=false;this.loading=false;this.onqueue=false;
		this.previewMode=(B.admin||this.options.preview)?true:false;
		this.isNew=(B.isNew)?true:false;
		this.refreshMode=false;
		this.unRead=0;
		this.dontUnHighlight=false;
		this.readOnly=App.staticUniverse;
		this.saveTimeout=null;
		this.saveHistoryTimeout=null;
		if(this.options.nativise){this.dataObj=App.Modules.nativiseModule(this.dataObj)}
		if(B.moduleName!="RssReader"){this.ico=App.Modules[B.moduleName+"Infos"].ico}
	},
	getIdentifier:function(){
		var A=false;
		if(typeof this.content!="undefined"&&typeof this.content.getIdentifier=="function"){
			A=this.content.getIdentifier()
		}
		if(!A){
			switch(this.dataObj.moduleName){
				case"RssReader":A=this.dataObj.data.feedId;break;
				case"Ical":A=this.dataObj.data.icalUrl;break;
				case"Api":
				case"UWA":
					A=this.dataObj.data.moduleUrl;break;
				case"MultipleFeeds":
					A=this.dataObj.data.provider;break
			}
		}
		if(!A){A=-1}return A
	},
	reportView:function(){
		var B,A={name:this.dataObj.moduleName,id:this.dataObj.id};
		if(B=this.getIdentifier()){A.ident=B}
		App.report("module.view",A)},
	enableDragging:function(){
		if(this.previewMode||this.readOnly){
			this.elm_moduleHeader.style.cursor="default";return false
		}
		this.previewMode=false;
		this.elm_moduleHeader.style.cursor="move";
		var A=this.elm_moduleHeader;
		App.DragMe(
			this.elm_moduleHeader,
			this.elm_module,
			function(B,E,D,C){if($("shareModuleBalloon")){$("shareModuleBalloon").style.display="none"}App.hideModulePopupMenu()},
			function(B,E,D,C){},
			(function(B,G,C){
				this.unHighlight();
				if(App.tabDrag){
					if(this.dataObj.tab!=App.tabDrag.dataObj.id){var F=null,D=App.tabList.length;for(var E=0;E<D;E++){if(App.tabList[E].dataObj.id==this.dataObj.tab){F=App.tabList[E]}}App.tabDrag.unRead[this.dataObj.id]=F.unRead[this.dataObj.id];App.tabDrag.setTitle();F.unRead[this.dataObj.id]=0;F.setTitle();this.dataObj.tab=App.tabDrag.dataObj.id;this.save();if(this.dataObj.tab==App.selectedTab){this.show()}else{this.hide()}App.saveUserData("order",this)}else{this.show()}$(A).addEvent("click",function(H){H.stop();setTimeout(function(){A.removeEvent("click",this)}.bind(arguments.callee),100)})
				}else{
					this.dataObj.container=moduleGhost.col.getAttribute("colNum");if(!moduleGhost.elm.parentNode){moduleGhost.col.appendChild(moduleGhost.elm)}else{if(moduleGhost.elm.parentNode!=moduleGhost.col){Element.remove(moduleGhost.elm);moduleGhost.col.appendChild(moduleGhost.elm)}}if(this.elm_module.previousSibling&&this.elm_module.previousSibling.id=="moduleGhost"&&this.dataObj.tab==App.selectedTab){}else{moduleGhost.col.insertBefore(this.elm_module,moduleGhost.elm);if(this.dataObj.tab!=App.selectedTab){var F=null,D=App.tabList.length;for(var E=0;E<D;E++){if(App.tabList[E].dataObj.id==this.dataObj.tab){F=App.tabList[E]}}App.selectedTabObj.unRead[this.dataObj.id]=F.unRead[this.dataObj.id];App.selectedTabObj.setTitle();F.unRead[this.dataObj.id]=0;F.setTitle();this.dataObj.tab=App.selectedTab;this.save()}if(this.widget&&this.widget.isIframed){this.widget.displayModuleIframe()}App.saveUserData("order",this)}
				}
				this.elm_module.style.position="static";this.elm_module.style.width="auto";
				if(App.isOnSearch){this.restoreStatus()}
				if(this.content&&typeof this.content.resize=="function"){this.content.resize()}
			}).bind(this)
		)
	},
	build:function(){
		if(this.elm_module){return true}
		this.elm_module=new Element("div",{"class":"module",events:{mouseover:this.highlight.bind(this),mouseleave:this.unHighlight.bind(this)}});
		if(this.dataObj.moduleName=="Meebo"){this.elm_module.style.position="static"}
		this.elm_module.dataObj=this.dataObj;
		var C=new Element("div",{"class":"moduleFrame moduleunHighlight"});
		var D=new Element("div",{"class":"moduleHeaderContainer"}).inject(C);
		this.elm_moduleHeader=new Element("div",{"class":"moduleHeader"}).inject(D);
		this.elm_showHide=new Element(
			"a",{"class":"showHide",href:"javascript:void(0)",styles:{visibility:"hidden"},events:{mousedown:this.onCollapseExpand.bindWithEvent(this)}}
		).adopt(Netvibes.UI.createIcon(this.dataObj.status==0?"actions-window-collapse":"actions-window-expand",this.dataObj.status==0?_("Expand"):_("Collapse"),15,15));
		this.elm_title=new Element("span",{"class":"title",text:this.dataObj.title});
		this.elm_ico=new Element("a",{"class":"ico",href:"javascript:void(0)"});
		if(this.dataObj.moduleName!="RssReader"){
			var B;
			if(B=App.iconMapper(this.ico)){
				this.elm_ico.innerHTML='<img width="16" height="16" src="'+App.getStaticUrl(NV_PATH+"img/s.gif")+'" style="width: 16px; height: 16px; background-image: url(\''+App.getStaticUrl(NV_PATH+B[0])+"'); background-position: -"+B[1]+"px -"+B[2]+'px;" class="hicon" />'
			}else{
				this.elm_ico.innerHTML='<img width="16" height="16" src="'+this.ico+'" class="hicon" />';
				if(!Browser.isOpera){this.elm_ico.firstChild.style.display="none"}
				this.elm_ico.firstChild.onload=function(){this.style.display="block"}
			}
			if(App.userCustom.hideFavIcons=="1"){this.elm_ico.firstChild.style.visibility="hidden"}
		}
		this.elm_sendModule=new Element(
			"a",{"class":"options",href:"javascript:void(0)",styles:{display:"none"},events:{mousedown:this.showPopupMenuSendModule.bindWithEvent(this)}}
		).adopt(Netvibes.UI.createIcon("actions-view-sendModule",_("Send this module"),13,16));
		if(!this.readOnly){
			this.elm_options=new Element(
				"a",{"class":"options",href:"javascript:void(0)",styles:{display:"none"},events:{mousedown:this.showPopupMenu.bindWithEvent(this)}}
			).adopt(Netvibes.UI.createIcon("actions-view-options",_("Options"),13,16));
			this.elm_edit=new Element(
				"a",{
					"class":"edit",
					href:"javascript:void(0)",
					text:_("Edit"),
					styles:{display:"none"},
					events:{mousedown:this.onEnterEdit.bindWithEvent(this)}
					}
			);
			this.elm_close=new Element(
				"a",{"class":"close",href:"javascript:void(0)",styles:{display:"none"},events:{mousedown:this.onClosing.bindWithEvent(this)}}
			).adopt(Netvibes.UI.createIcon("actions-window-close",_("Close"),13,16))
		}
		this.elm_refresh=new Element(
			"a",{"class":"refresh",href:"javascript:void(0)",styles:{display:"none"},events:{mousedown:this.refresh.bindWithEvent(this)}}
		).adopt(Netvibes.UI.createIcon("actions-view-refresh",_("Refresh"),12,16));
		this.elm_add=document.createElement("span");
		this.elm_add.className="info";this.elm_add.style.display="none";
		this.elm_editContent=new Element("div",{"class":"editContent"});
		var A=document.createElement("div");this.elm_moduleContent=A;
		A.className="moduleContent";A.innerHTML=_("Loading ...");
		if(this.dataObj.status==0){A.style.display="none"}
		if(!this.readOnly){
			this.elm_moduleHeader.appendChild(this.elm_close);this.elm_moduleHeader.appendChild(this.elm_edit);this.elm_moduleHeader.appendChild(this.elm_options);this.elm_moduleHeader.appendChild(this.elm_sendModule);this.elm_moduleHeader.appendChild(this.elm_refresh);this.elm_moduleHeader.appendChild(this.elm_add);this.elm_moduleHeader.appendChild(this.elm_showHide);this.elm_moduleHeader.appendChild(this.elm_ico);this.elm_moduleHeader.appendChild(this.elm_title)
		}else{
			this.elm_moduleHeader.appendChild(this.elm_sendModule);this.elm_moduleHeader.appendChild(this.elm_add);this.elm_moduleHeader.appendChild(this.elm_showHide);this.elm_moduleHeader.appendChild(this.elm_ico);this.elm_moduleHeader.appendChild(this.elm_title)
		}
		C.appendChild(this.elm_editContent);C.appendChild(A);this.elm_module.appendChild(C);this.colorize()
	},
	onEnterEdit:function(B){
		B.stop();var A=$("shareModuleBalloon");if(A){A.hide()}var C=$("modulePopupMenu");if(C){C.hide()}if(this.editMode){this.editMode=false;this.elm_edit.setText(_("Edit"));this.elm_editContent.innerHTML="";this.elm_editContent.style.display="none";Element.removeClassName(this.elm_module,"moduleEdit");Element.addClassName(this.elm_module,"module");App.keyboardFocus="module";if(typeof this.content.onCloseEdit=="function"){this.content.onCloseEdit()}if(App.isOnSearch&&this.dataObj.editStatus==0){this.hide()}}else{this.editModule()}},
	setUnread:function(A){
		if(typeof A=="undefined"){A=this.unread}else{this.unread=A}App.setTabUnread(this.dataObj.id,this.dataObj.tab,A)},
	showPopupMenuSendModule:function(A){
		this.showPopupMenu(A,true)},
	showPopupMenu:function(K,O){
		Event.stop(K);var H=$("shareModuleBalloon");
		if(H&&Element.visible(H)){Element.remove(H)}
		this.popupMenu=$("modulePopupMenu");
		if(!this.popupMenu){
			this.popupMenu=document.createElement("div");this.popupMenu.setAttribute("id","modulePopupMenu");this.popupMenu.className="modulePopupMenu";this.popupMenu.style.display="none";this.popupMenu.style.position="absolute";document.getElementsByTagName("body").item(0).appendChild(this.popupMenu);Event.observe(document,"mousedown",this.hidePopupMenu.bindAsEventListener(this));Event.observe(document,"mousedown",App.hideModulePopupMenu,true)}
		if(Element.visible(this.popupMenu)&&this.dataObj.id==this.popupMenu.getAttribute("moduleId")){
			this.hidePopupMenu();return }
		var B=[];
		if(O){
			if(App.registeredUser){if(User.username){B.push({name:"starModule",className:"starModule",text:_("Share as favorite")})}if(App.visit){B.push({name:"sendtomypage",className:"sendtomypage",text:_("Send to my private page")})}}if(User.username&&!(App.visit&&App.visit.my)&&App.universeModuleList.contains(this.dataObj.moduleName)){B.push({name:"sendtomyuniverse",className:"sendtomyuniverse",text:_("Send to my public page")})}if(this.dataObj.moduleName!="MailWizard"){B.push({name:"send",className:"send",text:_("Send to a friend")})}B.push({name:"sendtoblog",className:"sendtomyblog",text:_("Promote on my blog")})
		}else{
			if(typeof this.content.print=="function"&&!(Browser.isOpera||Browser.isIE)){B.push({name:"print",className:"print",text:_("Print this module")})}if(!App.staticUniverse){B.push({name:"clone",className:"clone separator",text:_("Duplicate this module")});B.push({name:"color",className:"color",text:"color"});B.push({name:"moveTop",className:"moveTop",text:_("Move to top")});B.push({name:"moveUp",className:"moveUp",text:_("Move up")});B.push({name:"moveRight",className:"moveRight",text:_("Move right")});B.push({name:"moveLeft",className:"moveLeft",text:_("Move left")});B.push({name:"moveDown",className:"moveDown",text:_("Move down")});B.push({name:"moveBottom",className:"moveBottom",text:_("Move to bottom")})}}
		this.popupMenu.setAttribute("moduleId",this.dataObj.id);
		this.popupMenu.innerHTML="";var D=document.createElement("ul");this.popupMenu.appendChild(D);
		for(var G=0,A;A=B[G];G++){
			var P=document.createElement("li");P.setAttribute("name",A.name);
			if(A.className){P.className=A.className}if((B.length-1)==G){Element.addClassName(P,"last")}if(G==0){Element.addClassName(P,"first")}if((A.name=="moveTop"||A.name=="moveUp")&&!App.LayoutManager.canMovePositionUp(this)){continue}else{if((A.name=="moveDown"||A.name=="moveBottom")&&!App.LayoutManager.canMovePositionDown(this)){continue}else{if(A.name=="moveLeft"&&!App.LayoutManager.canMovePositionLeft(this)){continue}else{if(A.name=="moveRight"&&!App.LayoutManager.canMovePositionRight(this)){continue}}}}var N=document.createElement("a");N.href=(A.htmlUrl||"javascript:void(0)");if(A.name=="collapse"){Element.addClassName(P,this.dataObj.status?"collapse":"expand");N.appendChild(document.createTextNode(this.dataObj.status?_("Collapse"):_("Expand")))}else{if(A.name=="color"){Element.addClassName(N,"postItcolorSelection");if(!Browser.isIE||Browser.version>=7){N.style.height="16px"}else{N.style.paddingBottom="16px"}var J='<div class="red" myColor="red"></div><div class="orange" myColor="orange"></div><div class="yellow" myColor="yellow"></div><div class="green" myColor="green"></div><div class="blue" myColor="blue"></div><div class="white" myColor="white"></div><div class="borderless" myColor="borderless"></div><div class="unpaint" myColor="unpaint" title="'+_("Default color")+'"></div>';N.innerHTML=J;var L=N.getElementsByTagName("div").length;for(var M=0;M<L;M++){N.getElementsByTagName("div")[M].onclick=function(R){var Q=this.parentNode.parentNode;Q.setAttribute("name",this.getAttribute("myColor"))}}}else{N.appendChild(document.createTextNode(A.text))}}P.onclick=this.eventMenuItemClicked.bindAsEventListener(this);P.appendChild(N);D.appendChild(P)}
		if(O){var F=Position.cumulativeOffset(this.elm_sendModule)}else{var F=Position.cumulativeOffset(this.elm_options)}
		if(!App.LayoutManager.canMovePositionRight(this)&&!App.dirRTL){
			this.popupMenu.style.left="auto";this.popupMenu.style.right="0px"
		}else{var C=Element.getDimensions(this.popupMenu).width;this.popupMenu.style.right="auto";this.popupMenu.style.left=(F[0]-(C/2))+"px"}
		this.popupMenu.style.top=(F[1]+20)+"px";
		if(Browser.isIE){
			var I=this.elm_editContent.getElementsByTagName("select");for(var E=0;E<I.length;E++){Element.addClassName(I[E],"hidden")}
		}
		this.dontUnHighlight=true;Element.show(this.popupMenu)
	},
	hidePopupMenu:function(D){
		if(!this.popupMenu){return }var C=$("shareModuleBalloon");if(C&&Element.visible(C)){return true}if(D&&Position.within(this.popupMenu,Event.pointerX(D),Event.pointerY(D))){Event.stop(D);return false}if(Browser.isIE){var B=this.elm_editContent.getElementsByTagName("select");for(var A=0;A<B.length;A++){Element.removeClassName(B[A],"hidden")}}this.dontUnHighlight=false;this.unHighlight();Element.hide(this.popupMenu);Event.stopObserving(document,"mousedown",this.hidePopupMenu);this.popupMenu=null},
	eventMenuItemClicked:function(E){
		var B=Event.findElement(E,"LI");if(Element.hasClassName(B,"disabled")){return }var D=$("shareModuleBalloon");if(D&&Element.visible(D)){Element.remove(D)}var A=B.getAttribute("name");switch(A){case"starModule":var C=new App.UI.ConfirmDialog.ShareWidget(this,{onConfirm:function(F){}.bind(this)}).show();break;case"send":if(this.dataObj.moduleName!="MailWizard"){showSendByMail=true;this.publish(E)}return false;break;case"sendtoblog":showSendByMail=true;this.publish(E);$("sendtofriend-blog").fireEvent("click");break;case"share":showSendByMail=false;this.publish(E);break;case"collapse":this.collapseExpand();break;case"edit":this.editModule.bindWithEvent(this);break;case"clone":App.Modules.cloneModule(this);break;case"moveUp":App.LayoutManager.movePositionUp(this);break;case"moveDown":App.LayoutManager.movePositionDown(this);break;case"moveTop":App.LayoutManager.movePositionTop(this);break;case"moveBottom":App.LayoutManager.movePositionBottom(this);break;case"moveLeft":App.LayoutManager.movePositionLeft(this);break;case"moveRight":App.LayoutManager.movePositionRight(this);break;case"white":case"yellow":case"green":case"red":case"blue":case"borderless":case"orange":this.dataObj.data.color=A;this.colorize(true);break;case"unpaint":delete this.dataObj.data.color;this.colorize(true);break;case"print":App.Modules.printModule(this);break;case"sendtomyuniverse":var C=new App.UI.ConfirmDialog.SendToPage(this,{direction:"public"}).show();break;case"sendtomypage":var C=new App.UI.ConfirmDialog.SendToPage(this,{direction:"private"}).show();break}this.hidePopupMenu();Event.stop(E)},
	addModuleToPage:function(){
		this.isNew=true;
		this.previewMode=false;
		////决定要载入的本module的位置:如果配置App.dirRTL==true,则新的module将‘降临’MainTable的右侧;否则默认左列第一个位置
		if(!this.dataObj.container){this.dataObj.container=App.dirRTL?App.selectedTabObj.dataObj.cols:1}
		////App.selectedTab.toString(): 分类tab的id 类似于id=tab82349054
		this.dataObj.tab=App.selectedTab;
		this.inject();
		return this
	},
	restoreModuleToPage:function(){
		this.addModuleToPage("module.restore")},
	updateFavicon:function(B,A){
		if(typeof A=="undefined"||A){this.ico=App.getFaviconUrl(B)}else{this.ico=B}if(!this.elm_ico){return }if(!Browser.isOpera||App.userCustom.hideFavIcons=="1"){this.elm_ico.innerHTML='<img width="16" height="16" class="hicon" src="'+this.ico+'" style="display:none"/>'}else{this.elm_ico.innerHTML='<img width="16" height="16" class="hicon" src="'+this.ico+'" />'}if(App.userCustom.hideFavIcons=="1"){this.elm_ico.style.width="16px";this.elm_ico.firstChild.style.visibility="hidden"}this.elm_ico.firstChild.onload=function(){this.style.display="block"}},
	refresh:function(A){
		if(typeof this.content.refresh=="function"){this.content.refresh()}if(A){A.stop()}},
	publish:function(e){
		var preconfiguredLink=false;var sendLink=false;var wasPreconfigured=true;if(!showSendByMail){return false}var e=new Event(e);e.stop();var publish_event=e;if(this.dataObj.moduleName=="PostIt"){var x=this.elm_moduleContent.firstChild;if(Browser.isMozilla){x=this.elm_moduleContent.lastChild.firstChild}if(x.onblur){x.onblur()}}if(showSendByMail){var smWindow=$("shareModuleBalloon");if(!smWindow){var bodyElement=document.getElementsByTagName("body").item(0);smWindow=document.createElement("div");smWindow.setAttribute("id","shareModuleBalloon");smWindow.className="balloon";smWindow.style.position="absolute";var contentBalloon=document.createElement("div");contentBalloon.className="content";bodyElement.appendChild(smWindow);smWindow.appendChild(contentBalloon)}else{contentBalloon=smWindow.firstChild}if(e.target){var sender=e.target}else{if(e.srcElement){var sender=e.srcElement}}if(typeof sender=="undefined"||!sender||sender==document){sender=this.elm_title}if(sender){var m=sender;var p;if(isNaN(Event.pointerX(e))||isNaN(Event.pointerY(e))){p=Position.cumulativeOffset(m);p[0]+=16;p[1]+=10}else{p=[Event.pointerX(e),Event.pointerY(e)]}var l=p[0];if(Browser.getDocumentWidth()-300<l){smWindow.className="balloonRight";if(l+47>Browser.getDocumentWidth()){l=(Browser.getDocumentWidth()-50)}l-=smWindow.offsetWidth-10}else{smWindow.className="balloon";l-=38;if(l<0){l=5}}Element.setStyle(smWindow,{left:(l)+"px",top:(p[1]+2)+"px"})}}function hideme(e){if($("shareClose")){Event.stopObserving($("shareClose"),"click",hideme)}if($("sendModuleMainMenuLink")){Event.stopObserving($("sendModuleMainMenuLink"),"click",showContents.bind(this))}Element.remove(smWindow);this.dontUnHighlight=false;this.unHighlight();var modulePopupMenu=$("modulePopupMenu");if(modulePopupMenu){Element.hide(modulePopupMenu)}if(e){Event.stop(e)}return false}var self=this;function updateBalloon(text,title){if($("shareClose")){Event.stopObserving($("shareClose"),"click",hideme)}if($("sendModulePreconfigured")){wasPreconfigured=$("sendModulePreconfigured").checked}if($("sendModuleMainMenuLink")){Event.stopObserving($("sendModuleMainMenuLink"),"click",showContents)}var s="",t=_("Send to a friend");if(typeof title!="undefined"&&title){t=title;if(t==_("Promote on my blog")){s='<span style="display:none"> (<a href="javascript:void(0)" id="sendModuleMainMenuLink">'+_("back")+"</a>)</span>"}else{s='<span> (<a href="javascript:void(0)" id="sendModuleMainMenuLink">'+_("back")+"</a>)</span>"}}Element.update(contentBalloon,"<h3>"+t+s+"</h3>"+text+'<p><img src="/img/closeMod.gif" id="shareClose" alt="" class="close" /></p>');if(typeof title!="undefined"&&title){Event.observe($("sendModuleMainMenuLink"),"click",showContents.bindWithEvent(self))}Event.observe($("shareClose"),"click",hideme.bindWithEvent(self))}function showContents(){var text="",mailText;if(showSendByMail){if(smWindow.className=="balloonRight"){var widthInPixels=Element.getStyle(smWindow,"width");var widthValue=widthInPixels.substring(0,widthInPixels.length-2);if(widthValue!=270){smWindow.style.left=parseInt(smWindow.style.left,10)+(parseInt(widthValue,10)-300)+"px"}}Element.setStyle(smWindow,{width:300+"px"});var allow_preconfigure=App.universeModuleList.contains(this.dataObj.moduleName);sendLink="http://"+NV_HOST+NV_PATH+"subscribe.php?";switch(this.dataObj.moduleName){case"RssReader":sendLink+="feed="+escape(this.dataObj.feedUrl);break;case"Ical":sendLink+="ical="+escape(this.dataObj.data.icalUrl);break;case"Api":sendLink+="api="+escape(this.dataObj.data.moduleUrl);break;case"UWA":sendLink+="uwa="+escape(this.dataObj.data.moduleUrl);break;case"MultipleFeeds":sendLink+="module="+this.dataObj.moduleName+"&provider="+this.dataObj.data.provider;break;case"Flash":sendLink+="flash="+encodeURIComponent(this.dataObj.data.flashUrl);break;default:n=this.dataObj.moduleName;if(x=Netvibes.checkVibes(n)){n=x.name+"&_type="+x.type}else{if(n=="Vibes"){n=n+"&_type="+this.dataObj.data._type}}sendLink+="module="+n}text+='<dl class="email">';text+='<dt><a href="javascript:void(0)" id="sendtofriend-email">'+_("by e-mail")+"</a></dt>";text+="<dd>"+_("your friends will receive a link to add your module in one click")+"</dd>";text+="</dl>";text+='<dl class="im">';text+='<dt><a href="javascript:void(0)" id="sendtofriend-im">'+_("by instant messaging")+"</a></dt>";text+="<dd>"+_("copy and paste the link to your IM")+"</dd>";text+="</dl>";text+='<dl class="blog" style="display:none">';text+='<dt><a href="javascript:void(0)" id="sendtofriend-blog">'+_("on my blog, myspace...")+"</a></dt>";text+="<dd>"+_("we provide you the html code to add it to your site")+"</dd>";text+="</dl>";text+="</div>";updateBalloon(text);Event.observe($("sendtofriend-im"),"click",(function(e){smWindow.style.width="370px";if(smWindow.className=="balloonRight"){smWindow.style.left=(parseInt(smWindow.style.left,10)-70)+"px"}normal_text="";normal_text+="<form>";normal_text+="<p>";normal_text+='<a href="aim:"><img src="/img/sendModule/aim.gif" style="border: 0" /></a>';normal_text+='<a href="skype:"><img src="/img/sendModule/skype.gif" style="border: 0" /></a>';normal_text+='<a href="msnim:chat?"><img src="/img/sendModule/msn.gif" style="border: 0" /></a>';normal_text+='<a href="gtalk:"><img src="/img/sendModule/gtalk.gif" style="border: 0" /></a>';normal_text+='<a href="ymsgr:"><img src="/img/sendModule/yahoo.gif" style="border: 0" /></a>';normal_text+='<a href="#" id="sendViaTwitter"><img src="/img/sendModule/twitter.gif" style="border: 0" /></a>';normal_text+="</p>";normal_text+="<p>";normal_text+=_("Copy this link in your favorite instant messaging application:");normal_text+="</p>";normal_text+='<p class="shareInfo">';normal_text2="";normal_text2+='<input class="text url" type="text" value="" id="link-input" size="50" /><br/>';normal_text2+='<a href="javascript:void(0)" id="copy-link">'+_("Right click and copy this link")+"</a></label><br/>";normal_text2+="</p>";normal_text2+="</form>";function setIMlink(){if(allow_preconfigure&&$("sendModulePreconfigured").checked){$("link-input").value=preconfiguredLink;$("copy-link").href=preconfiguredLink;if($("twitter-textarea")){$("twitter-textarea").value=$("twitter-textarea").value.replace(sendLink,preconfiguredLink);$("twitter-textarea").onkeyup()}return }$("link-input").value=sendLink;$("copy-link").href=sendLink;if($("twitter-textarea")){$("twitter-textarea").value=$("twitter-textarea").value.replace(preconfiguredLink,sendLink);$("twitter-textarea").onkeyup()}}if(allow_preconfigure){text=normal_text;text+='<label><input type="checkbox" id="sendModulePreconfigured" /> ';text+=_("Share module <b>pre-configured</b>")+"</label><br/>";text+=normal_text2;updateBalloon(text,_("Send to a friend by instant messaging"));if(wasPreconfigured){$("sendModulePreconfigured").checked=true}if(preconfiguredLink){setIMlink()}else{$("link-input").value=_("Loading...");var pdata="preconfigure_module="+this.dataObj.id;if(App.visit&&App.visit.id){pdata+="&visit="+App.visit.id}App.Request.sendPOST(NV_PATH+"ajax/sendModule/store.php",pdata,function(r){if(r.responseText=="error"){if($("sendModulePreconfigured")){$("sendModulePreconfigured").checked=false}}else{if($("sendModulePreconfigured")){$("sendModulePreconfigured").checked=true}preconfiguredLink=r.responseText}setIMlink()})}Event.observe($("sendModulePreconfigured"),"click",function(e){setIMlink()})}else{text=normal_text+normal_text2;updateBalloon(text,_("Send to a friend by instant messaging"));setIMlink()}$("sendViaTwitter").onclick=(function(){if($("twitter-login")){return }if(!$("link-input").value){return }var div=document.createElement("div");content="<br/>";content+='<img src="/img/sendModule/twitter.gif" style="border:0;float:left;" /><b style="display: block; margin-top: 4px;">'+_("Post this link on your twitter");content+="</b><p style='clear:both;'>";content+=_("Enter your twitter login: ")+"<input id='twitter-login' type='text' name='username_or_email'>";content+="<br/>";content+=_("Enter your twitter password: ")+"<input id='twitter-password' type='password'>";content+="</p>";content+="<p align='right'>"+_("Characters available:")+" <b><span id='twitter-available'>140</span></p></b>";content+="<p align='center'>";content+="<textarea id='twitter-textarea' style='width:340px' rows='4'>"+_("Check this module:")+" "+$("link-input").value+"</textarea>";content+="<br/>";content+="<input id='link-twitter-input' type='button' value='"+_("Update")+"' /></p><p class='message' id='twitter-message'></p>";div.innerHTML=content;$("shareModuleBalloon").getElementsByTagName("form")[0].appendChild(div);$("twitter-textarea").onkeypress=function(e){return(e.which==8)||(this.value.length<140)};$("twitter-textarea").onkeyup=function(e){$("twitter-available").innerHTML=140-this.value.length};$("twitter-textarea").onkeyup();Event.observe($("link-twitter-input"),"click",(function(e){if($("twitter-textarea").value.length>140){alert(_("Message too long"));return false}$("link-twitter-input").value=_("Updating...");$("link-twitter-input").disabled="disabled";var data="";data+="module="+this.dataObj.id;data+="&login="+$("twitter-login").value;data+="&pass="+$("twitter-password").value;data+="&message="+$("twitter-textarea").value;if(App.visit&&App.visit.id){data+="&visit="+App.visit.id}$("twitter-message").innerHTML=_("Be patient, this could take up to one minute.");App.Request.sendPOST(NV_PATH+"ajax/sendModule/twitter.php",data,function(r){try{r=eval("("+r.responseText+")")}catch(e){$("twitter-message").innerHTML=_("Error: check your login/password");$("link-twitter-input").value=_("Update");$("link-twitter-input").disabled="";return }var url="http://www.twitter.com/"+r.user.screen_name;$("twitter-message").innerHTML=_("Your twitter has been updated: ")+"<a href='"+url+"' target='_blank'>"+url+"</a>";$("link-twitter-input").value=_("Update");$("link-twitter-input").disabled="";return });return false}).bindWithEvent(this));return false}).bind(this);Event.observe($("link-input"),"click",function(e){var link=(allow_preconfigure&&$("sendModulePreconfigured").checked)?preconfiguredLink:sendLink;if(window.clipboardData){window.clipboardData.setData("Text",link)}$("link-input").focus();$("link-input").select()});Event.observe($("copy-link"),"click",function(e){var link=(allow_preconfigure&&$("sendModulePreconfigured").checked)?preconfiguredLink:sendLink;if(window.clipboardData){window.clipboardData.setData("Text",link)}Event.stop(e);return false});Event.stop(e);return false}).bindWithEvent(this),false);Event.observe($("sendtofriend-blog"),"click",(function(e){smWindow.style.width="370px";if(smWindow.className=="balloonRight"){smWindow.style.left=(parseInt(smWindow.style.left,10)-70)+"px"}normal_text="";normal_text+="<form>";normal_text+="<p>";normal_text+=_("Copy the following HTML code into your blog and a button to add this widget will be automatically generated:");normal_text+="</p>";normal_text+='<p class="shareInfo">';normal_text2="";normal_text2+='<textarea id="html-box" rows="5" cols="30" style="width: 330px"> </textarea><br />';normal_text2+='<a href="javascript:void(0)" id="select-all-box">'+_("Select all")+"</a></label><br/>";normal_text2+="</p>";normal_text2+='<p id="html-box-preview">';normal_text2+="</p>";normal_text2+="</form>";function setHTMLcode(){var link=sendLink;if(allow_preconfigure&&$("sendModulePreconfigured").checked){link=preconfiguredLink}link='<a href="'+link+'" target="_blank"><img src="http://www.netvibes.com/img/add2netvibes.gif" border="none" width="91" height="17" alt="Add to Netvibes" /></a>';if(Browser.isSafari){$("html-box").firstChild.nodeValue=link}else{$("html-box").value=link}$("html-box-preview").innerHTML=_("Preview of the button:")+" "+link}if(allow_preconfigure){text=normal_text;text+='<label><input type="checkbox" id="sendModulePreconfigured" /> ';text+=_("Share module <b>pre-configured</b>")+"</label><br/>";text+=normal_text2;updateBalloon(text,_("Promote on my blog"));if(wasPreconfigured){$("sendModulePreconfigured").checked=true}if(preconfiguredLink){setHTMLcode()}else{$("html-box").firstChild.nodeValue=_("Loading...");var pdata="preconfigure_module="+this.dataObj.id;if(App.visit&&App.visit.id){pdata+="&visit="+App.visit.id}App.Request.sendPOST(NV_PATH+"ajax/sendModule/store.php",pdata,function(r){if(r.responseText=="error"){$("sendModulePreconfigured").checked=false}else{$("sendModulePreconfigured").checked=true;preconfiguredLink=r.responseText}setHTMLcode()})}Event.observe($("sendModulePreconfigured"),"click",function(e){setHTMLcode()})}else{text=normal_text+normal_text2;updateBalloon(text,_("Promote on my blog"))}setHTMLcode();function selectAllHTML(){$("html-box").focus();$("html-box").select()}Event.observe($("html-box"),"click",selectAllHTML);Event.observe($("select-all-box"),"click",selectAllHTML);return false}).bindWithEvent(this),false);if(!App.registeredUser){Element.addClassName($("shareModuleBalloon").getElementsByTagName("dl")[0],"transparent");$("shareModuleBalloon").getElementsByTagName("dd")[0].innerHTML=_("this option is for netvibes members, register now it's free!")}Event.observe($("sendtofriend-email"),"click",function(e){if(!App.registeredUser){Element.remove($("shareModuleBalloon"));App.hideModulePopupMenu(e);return false}text="";text+='<form id="sendModuleEmailForm">';text+="<p>";if(!App.registeredUser){text+="<label>"+_("Your e-mail address")+"<br/>";text+='<input class="email" type="text" id="myEmail" style="width:200px" value=""/></label><br/>'}text+="<label>"+_("Your friend's address")+"<br/>";text+='<input class="email" type="text" id="friendEmail" style="width:200px" value=""/></label><br/>';if(App.registeredUser){text+='<span class="hint">('+_("multiple addresses must be separated by commas")+")</span><br/>"}text+="</p>";text+='<p id="personalizeMail" style="display: none">';text+='<label for="mailTextInput">'+_("Your own text:")+'</label><br /><textarea id="mailTextInput"/></textarea>';text+="</p>";text+='<p id="personalizeLink">';text+='<a href="javascript:void(0)" id="personalizeMessage">'+_("Personalize the message")+"</a>";text+="</p>";if(allow_preconfigure){text+='<p class="shareInfo">&nbsp;';text+='<label><input type="checkbox" id="sendModulePreconfigured" /> ';text+=_("Share module <b>pre-configured</b>")+"</label><br/>";text+="</p>"}text+='<p><label><input type="checkbox" id="sendModuleCopyByMail" /> '+_("send me a copy of the e-mail")+"</label></p>";text+='<p style="text-align:right"><input type="submit" value="'+_("Send")+'" id="sendModuleSubmit" /></p>';text+="</form>";updateBalloon(text,_("Send to a friend by e-mail"));if(allow_preconfigure&&wasPreconfigured){$("sendModulePreconfigured").checked=true}if(!App.registeredUser&&App.sendModuleMyEmail){$("myEmail").value=App.sendModuleMyEmail}if(App.sendModuleFriendEmail){$("friendEmail").value=App.sendModuleFriendEmail}mailText=_("Hi")+"\n\n"+_("Just wanted to show you this module on Netvibes. Click on the link to add it to your page.")+"\n\n"+_("Best,")+" ";mailText+=User.Profile.displayName||User.username||User.email||_("Your Netviber");var m=$("mailTextInput");m.value=mailText;m.style.width="370px";m.style.height="150px";Event.observe($("personalizeMessage"),"click",function(){smWindow.style.width="400px";if(smWindow.className=="balloonRight"){smWindow.style.left=(parseInt(smWindow.style.left,10)-100)+"px"}$("personalizeMail").style.display="block";$("personalizeLink").style.display="none"});var sendMail=function(e){var e=new Event(e);Event.stop(e);var s=$("sendModuleSubmit");s.disabled=true;var t="";var data="";if(!App.registeredUser){fromemail=$("myEmail").value;App.sendModuleMyEmail=fromemail;if(!String.isEmail(fromemail)){alert(_("Your own e-mail address is not valid"));s.disabled=false;Event.stop(e);return false}data+=t+"myEmail="+fromemail;t="&"}var friendEmails=[];email=$("friendEmail").value;App.sendModuleFriendEmail=email;emails=email.split(",");var ln=emails.length;if(ln>5){ln=5}for(i=0;i<ln;i++){email=emails[i].trim();if(!String.isEmail(email)){alert(_("Your friend's e-mail address ({0}) is not valid").format(email));s.disabled=false;Event.stop(e);return false}friendEmails.push(email)}data+=t+"friendEmail="+friendEmails.join(",");t="&";data+="&module="+this.dataObj.id;if($("personalizeMail").style.display=="block"){mailText=$("mailTextInput").value}var preconfigured=false;if(allow_preconfigure&&$("sendModulePreconfigured").checked){data+="&preconfigured=1";preconfigured=true}data+="&mailText="+encodeURIComponent(mailText);if($("sendModuleCopyByMail").checked){data+="&sendCopy=1"}if(App.visit&&App.visit.id){data+="&visit="+App.visit.id}App.Request.sendPOST(NV_PATH+"ajax/sendModule/send.php",data,(function(r){if(r.responseText=="success"){var m=(preconfigured)?_("This module has been <strong>successfully</strong> sent (with current settings) to:"):_("This module has been <strong>successfully</strong> sent to:");contentBalloon.innerHTML="<p>"+m+"</p><ul><li>"+emails.join("</li><li>")+'</li></ul><p><a href="javascript:void(0)">'+_("Close this window")+"</a></p>";Event.observe(contentBalloon.getElementsByTagName("a")[0],"click",hideme.bindWithEvent(this))}else{contentBalloon.innerHTML='<p style="color:#A00;">'+_("An <strong>error</strong> happened while sending the module.")+'</p><p><a href="javascript:void(0)">'+_("Wait a moment and try again")+"</a></p>";Event.observe(contentBalloon.getElementsByTagName("a")[0],"click",(function(e){this.publish(publish_event);Event.stop(e);return false}).bindWithEvent(this))}}).bind(this));return false};$("sendModuleEmailForm").addEvent("submit",sendMail.bindWithEvent(this));Event.stop(e);return false}.bindWithEvent(this),false)}this.dontUnHighlight=true;Element.show(smWindow)}(showContents.bind(this))()},
	colorize:function(B){
		if(B){Element.removeClassName(this.elm_moduleHeader,"white");Element.removeClassName(this.elm_moduleHeader,"yellow");Element.removeClassName(this.elm_moduleHeader,"green");Element.removeClassName(this.elm_moduleHeader,"red");Element.removeClassName(this.elm_moduleHeader,"blue");Element.removeClassName(this.elm_moduleHeader,"orange");Element.removeClassName(this.elm_moduleHeader,"borderless");if(this.dataObj.moduleName=="PostIt"){Element.removeClassName(this.elm_module,"white-webnote");Element.removeClassName(this.elm_module,"yellow-webnote");Element.removeClassName(this.elm_module,"green-webnote");Element.removeClassName(this.elm_module,"red-webnote");Element.removeClassName(this.elm_module,"blue-webnote");Element.removeClassName(this.elm_module,"orange-webnote");Element.removeClassName(this.elm_module,"borderless-webnote")}Element.removeClassName(this.elm_module,"white-module");Element.removeClassName(this.elm_module,"yellow-module");Element.removeClassName(this.elm_module,"green-module");Element.removeClassName(this.elm_module,"red-module");Element.removeClassName(this.elm_module,"blue-module");Element.removeClassName(this.elm_module,"orange-module");Element.removeClassName(this.elm_module,"borderless-module");this.save()}var A=this.dataObj.data.color;if(A==null&&this.dataObj.moduleName=="PostIt"){A="yellow"}if(A!=null){Element.addClassName(this.elm_moduleHeader,A);if(this.dataObj.moduleName=="PostIt"){Element.addClassName(this.elm_module,A+"-webnote")}Element.addClassName(this.elm_module,A+"-module")}},
	save:function(){
		if(isNaN(parseInt(this.dataObj.container,10))||this.previewMode){return }if(this.saveTimeout){clearTimeout(this.saveTimeout)}if(typeof this.dataObj.id=="undefined"||this.dataObj.id=="undefined"){this.saveTimeout=setTimeout((function(){this.save()}).bind(this),1000);return }this.saveTimeout=setTimeout((function(){App.saveUserData("module",this.dataObj)}).bind(this),1500);return this},
	saveHistory:function(){
		if(this.saveHistoryTimeout){clearTimeout(this.saveHistoryTimeout)}if(isNaN(parseInt(this.dataObj.container,10))){return }this.saveHistoryTimeout=setTimeout((function(){App.saveUserData("history",this.dataObj)}).bind(this),1500)},
	showEdit:function(){this.endEditMode();this.highlight();this.editModule()},
	endEditMode:function(){
		this.editMode=false;if(this.elm_edit){this.elm_edit.setText(_("Edit"));this.elm_editContent.empty();this.elm_editContent.style.display="none"}this.unHighlight();this.elm_module.removeClass("moduleEdit");this.elm_module.addClass("module");App.keyboardFocus="module"},
	editModule:function(A){
		this.highlight();this.editMode=true;App.keyboardFocus="module.edit";
		this.content.edit();
		Element.removeClassName(this.elm_module,"module");
		Element.addClassName(this.elm_module,"moduleEdit");
		this.elm_editContent.style.display="block";
		this.elm_edit.setText(_("Close Edit"));
		if(App.isOnSearch){this.dataObj.editStatus=this.dataObj.status}
		if(this.elm_moduleContent.style.display=="none"){this.expand()}else{this.expand("nosave")}
		App.keyboardFocus="module.edit"},
	highlight:function(){
		if(!this.editMode){
			if(!this.previewMode){
				this.elm_showHide.style.visibility="visible";this.elm_showHide.style.width="16px";this.elm_ico.style.display="none";if(this.elm_close){this.elm_close.style.display="block"}if(this.elm_options){this.elm_options.style.display="block"}this.elm_sendModule.style.display="block";if(this.elm_refresh&&this.refreshMode){this.elm_refresh.style.display="block"}
			}
			if(this.elm_edit&&this.loaded&&this.options.editable){this.elm_edit.style.display="block"}
		}},
	unHighlight:function(){
		if(this.editMode||this.dontUnHighlight){return }
		if(this.elm_showHide){this.elm_showHide.style.visibility="hidden";this.elm_showHide.style.width=0}
		if(this.elm_ico){this.elm_ico.style.display="block"}
		if(this.elm_close){this.elm_close.style.display="none"}
		if(this.elm_refresh){this.elm_refresh.style.display="none"}
		if(this.elm_options){this.elm_options.style.display="none"}
		if(this.elm_sendModule){this.elm_sendModule.style.display="none"}
		if(!this.previewMode&&this.elm_edit){this.elm_edit.style.display="none"}
		$_("tooltip").style.display="none"},
	onCollapseExpand:function(A){A.stop();if(this.dataObj.moduleName=="Meebo"){return false}this.collapseExpand()},
	collapseExpand:function(A){
			if(this.elm_moduleContent.style.display=="none"||this.elm_moduleContent.style.visibility=="hidden"){
				this.expand(A)}else{this.collapse(A)}},
	collapse:function(A){
		if(this.dataObj.moduleName=="Meebo"){this.elm_moduleContent.style.visibility="hidden"}else{this.elm_moduleContent.style.display="none"}
		this.elm_showHide.firstChild.className="actions-window-expand";
		this.elm_showHide.firstChild.alt=this.elm_showHide.firstChild.title=_("Expand");
		this.dataObj.status=0;
		if(undefined==A){this.save()}},
	expand:function(A){
		if(this.dataObj.moduleName=="Meebo"){this.elm_moduleContent.style.visibility="visible"}else{this.elm_moduleContent.style.display="block"}
		this.elm_showHide.firstChild.className="actions-window-collapse";
		this.elm_showHide.firstChild.alt=this.elm_showHide.firstChild.title=_("Collapse");
		this.dataObj.status=1;
		if(undefined==A){this.save()}},
	onClosing:function(B){
		if(B){B.stop()}var A=new App.UI.ConfirmDialog.DeleteWidget(this,{}).show()},
	remove:function(D){
		if(typeof D=="undefined"){D=true}
		var C=null;
		for(var B=0,A=App.tabList.length;B<A;B++){
			if(App.tabList[B].dataObj.id==this.dataObj.tab){C=App.tabList[B]}
		}
		C.unRead[this.dataObj.id]=0;C.setTitle();
		App.moduleList.remove(this);
		this.elm_module.remove();
		["shareModuleBalloon","modulePopupMenu","minitabsOptions"].each(function(E){E=$(E);if(E){E.hide()}});
		if(D){App.saveUserData("close",this)}return true},
	restoreStatus:function(){
		this.elm_module.removeClass("transparent");if(this.dataObj.status==0){this.collapse("nosave")}else{this.expand("nosave")}},
	show:function(A){
		if(!this.elm_module){return true}this.elm_module.style.visibility="visible";this.elm_module.style.display="block"},
	hide:function(A){
		if(!this.elm_module){this.build()}
		if(App.isOnSearch){this.elm_module.addClass("transparent");this.collapse("nosave");return }
		this.elm_module.style.display="none"},
	isVisible:function(){return(this.elm_module.style.display!="none"&&this.elm_module.parentNode&&this.elm_module.parentNode.nodeType!=11)},
	attachContent:function(){
		if(typeof this.content=="object"){return true}
		this.loading=true;
		App.Modules.LoadQueue.loadingItems.push(this.dataObj.id);
		this.attachCSS();
		var B=this.dataObj.moduleName;
		var D=function(){
			if(App.Modules[B]){return App.Modules[B]}else{if(App.Modules[B.toLowerCase()]){return App.Modules[B]=App.Modules[B.toLowerCase()]}}
			return null
		};
		var C=D();
		if(C){
			this.content=new C(this);this.search()
		}else{
			var A=new Asset.javascript(App.Modules[this.dataObj.moduleName+"Infos"].path,{onload:function(){var E=D();if(!this.content){this.content=new E(this)}this.search()}.bind(this),check:D})
		}},
	attachCSS:function(){
		var A=App.Modules[this.dataObj.moduleName+"Infos"].css;
		if(A){if(typeof A=="array"){A.each(function(B){App.insertCssFile(B)})}else{App.insertCssFile(A)}}},
	search:function(){
		if(App.isOnSearch){
			if(parseInt(this.dataObj.oldStatus,10)!=1&&parseInt(this.dataObj.oldStatus,10)!=0){
				this.dataObj.oldStatus=this.dataObj.status
			}
			if(typeof this.content.doSearch=="function"){
				if(typeof this.dataObj.extendSearch=="number"){
					this.dataObj.extendSearch=(App.dlaFilter)?0:1
				}
				this.content.doSearch(App.query)
			}else{this.hide(true)}
		}},
	unload:function(){
		delete this.elm_module;
		delete this.elm_moduleHeader;
		delete this.elm_moduleContent;
		delete this.elm_editContent;
		delete this.elm_showHide;
		delete this.elm_edit;
		delete this.elm_refresh;
		delete this.elm_title;
		if(this){delete this}},
	inject:function(B){
		if(!this.elm_module){this.build()}
		if(B){
			$(B).adopt(this.elm_module)
		}else{
			if(typeof this.dataObj.container=="object"){
				this.dataObj.container.appendChild(this.elm_module)
			}else{
				if(Number(this.dataObj.container)>0){
					var A=App.ColManager["col"+this.dataObj.container];
					if(this.isNew&&A.hasChildNodes()){
						if($("moduleGhost")){
							A.replaceChild(this.elm_module,$("moduleGhost"))
						}else{
							if(typeof (this.dataObj.row)=="undefined"){
								A.insertBefore(this.elm_module,A.firstChild)
							}else{A.appendChild(this.elm_module)}
						}
					}else{A.appendChild(this.elm_module)}
				}
			}
		}
		if(!this.previewMode&&!this.readOnly){this.enableDragging()}else{this.elm_moduleHeader.style.cursor="default"}
		this.unHighlight();
		return this
	},
	onLoadModule:function(){
		this.loaded=true;this.loading=false;
		App.Modules.LoadQueue.loadingItems.remove(this.dataObj.id);
		if(App.Modules.LoadQueue.items.length){App.Modules.LoadQueue.process()}
		if(this.previewMode){this.highlight()}},
	load:function(A){
		if(this.loaded||this.loading){return }
		if(!this.elm_module||!this.elm_module.parentNode||this.elm_module.parentNode.nodeType==11){
			this.inject()
		}
		if(A){
			App.Modules.LoadQueue.items.push(this);
			this.onqueue=true;
			if(App.Modules.LoadQueue.timeout){clearTimeout(App.Modules.LoadQueue.timeout)}
			App.Modules.LoadQueue.timeout=App.Modules.LoadQueue.process.delay(10,App.Modules.LoadQueue)
		}else{this.loadContent()}
		return this},
	loadContent:function(){
		this.attachContent();
		if(this.dataObj.moduleName=="RssReader"&&App.isOnSearch){
			if(typeof this.dataObj.oldStatus!="number"||this.dataObj.oldStatus==-1){
				this.dataObj.oldStatus=this.dataObj.status}
		}}
});

App.hideModulePopupMenu=function(E){
	var H=$("modulePopupMenu");
	var D=$("shareModuleBalloon");
	if(D&&Element.visible(D)){return true}
	if(H&&Element.visible(H)){
		if(E){var A=Event.findElement(E,"DIV")}else{A=null}
		if(A&&A.className=="options"&&Element.visible(H)){return }
		if(E&&Position.within(H,Event.pointerX(E),Event.pointerY(E))){Event.stop(E);return false}
		var G=H.getAttribute("moduleId");
		var B=App.moduleList.length;
		for(var F=0;F<B;F++){if(App.moduleList[F].dataObj.id==G){var C=true;break}}
		if(C){App.moduleList[F].dontUnHighlight=false;App.moduleList[F].unHighlight()}
		Element.hide(H)
	}};;

//18
App.TabOptions={
	attachEvents:function(){var A=$("tabOptions");if(!App.isPremium()&&App.userCustom.enableFx==1){A.set("slide",{duration:600,transition:Fx.Transitions.Pow.easeOut,link:"cancel"});A.get("slide").addEvent("onComplete",function(){A.open=this.open});A.slide("hide").slide("out")}else{A.hide()}}};
var tabGhost=document.createElement("li");
tabGhost.id="tabGhost";
tabGhost.innerHTML="<img src='img/s.gif'/>&nbsp;";
var mapIcons="";
	mapIcons+='<area shape="rect" coords="1,1,19,19" href="img/eco.png" />';mapIcons+='<area shape="rect" coords="19,1,37,19" href="img/favicon.png" />';mapIcons+='<area shape="rect" coords="37,1,55,19" href="img/icons/anchor.gif" />';mapIcons+='<area shape="rect" coords="55,1,73,19" href="img/icons/attach.gif" />';mapIcons+='<area shape="rect" coords="73,1,91,19" href="img/icons/basket.gif" />';mapIcons+='<area shape="rect" coords="91,1,109,19" href="img/icons/bomb.gif" />';mapIcons+='<area shape="rect" coords="109,1,127,19" href="img/icons/book.gif" />';mapIcons+='<area shape="rect" coords="127,1,145,19" href="img/icons/book_addresses.gif" />';mapIcons+='<area shape="rect" coords="145,1,163,19" href="img/icons/book_open.gif" />';mapIcons+='<area shape="rect" coords="163,1,181,19" href="img/icons/brick.gif" />';mapIcons+='<area shape="rect" coords="181,1,199,19" href="img/icons/briefcase.gif" />';mapIcons+='<area shape="rect" coords="199,1,217,19" href="img/icons/bug.gif" />';mapIcons+='<area shape="rect" coords="217,1,235,19" href="img/icons/cake.gif" />';mapIcons+='<area shape="rect" coords="235,1,253,19" href="img/icons/calendar_view_day.gif" />';mapIcons+='<area shape="rect" coords="1,19,19,37" href="img/icons/calendar_view_month.gif" />';mapIcons+='<area shape="rect" coords="19,19,37,37" href="img/icons/camera.gif" />';mapIcons+='<area shape="rect" coords="37,19,55,37" href="img/icons/car.gif" />';mapIcons+='<area shape="rect" coords="55,19,73,37" href="img/icons/cd.gif" />';mapIcons+='<area shape="rect" coords="73,19,91,37" href="img/icons/chart_bar.gif" />';mapIcons+='<area shape="rect" coords="91,19,109,37" href="img/icons/chart_curve.gif" />';mapIcons+='<area shape="rect" coords="109,19,127,37" href="img/icons/chart_organisation.gif" />';mapIcons+='<area shape="rect" coords="127,19,145,37" href="img/icons/chart_pie.gif" />';mapIcons+='<area shape="rect" coords="145,19,163,37" href="img/icons/clock.gif" />';mapIcons+='<area shape="rect" coords="163,19,181,37" href="img/icons/clock_red.gif" />';mapIcons+='<area shape="rect" coords="181,19,199,37" href="img/icons/cog.gif" />';mapIcons+='<area shape="rect" coords="199,19,217,37" href="img/icons/coins.gif" />';mapIcons+='<area shape="rect" coords="217,19,235,37" href="img/icons/color_swatch.gif" />';mapIcons+='<area shape="rect" coords="235,19,253,37" href="img/icons/comment.gif" />';mapIcons+='<area shape="rect" coords="1,37,19,55" href="img/icons/computer.gif" />';mapIcons+='<area shape="rect" coords="19,37,37,55" href="img/icons/connect.gif" />';mapIcons+='<area shape="rect" coords="37,37,55,55" href="img/icons/creditcards.gif" />';mapIcons+='<area shape="rect" coords="55,37,73,55" href="img/icons/door.gif" />';mapIcons+='<area shape="rect" coords="73,37,91,55" href="img/icons/door_open.gif" />';mapIcons+='<area shape="rect" coords="91,37,109,55" href="img/icons/drink.gif" />';mapIcons+='<area shape="rect" coords="109,37,127,55" href="img/icons/drink_empty.gif" />';mapIcons+='<area shape="rect" coords="127,37,145,55" href="img/icons/email.gif" />';mapIcons+='<area shape="rect" coords="145,37,163,55" href="img/icons/email_open.gif" />';mapIcons+='<area shape="rect" coords="163,37,181,55" href="img/icons/email_open_image.gif" />';mapIcons+='<area shape="rect" coords="181,37,199,55" href="img/icons/emoticon_evilgrin.gif" />';mapIcons+='<area shape="rect" coords="199,37,217,55" href="img/icons/emoticon_grin.gif" />';mapIcons+='<area shape="rect" coords="217,37,235,55" href="img/icons/emoticon_happy.gif" />';mapIcons+='<area shape="rect" coords="235,37,253,55" href="img/icons/emoticon_smile.gif" />';mapIcons+='<area shape="rect" coords="1,55,19,73" href="img/icons/emoticon_surprised.gif" />';mapIcons+='<area shape="rect" coords="19,55,37,73" href="img/icons/emoticon_tongue.gif" />';mapIcons+='<area shape="rect" coords="37,55,55,73" href="img/icons/emoticon_unhappy.gif" />';mapIcons+='<area shape="rect" coords="55,55,73,73" href="img/icons/emoticon_waii.gif" />';mapIcons+='<area shape="rect" coords="73,55,91,73" href="img/icons/emoticon_wink.gif" />';mapIcons+='<area shape="rect" coords="91,55,109,73" href="img/icons/exclamation.gif" />';mapIcons+='<area shape="rect" coords="109,55,127,73" href="img/icons/eye.gif" />';mapIcons+='<area shape="rect" coords="127,55,145,73" href="img/icons/feed.gif" />';mapIcons+='<area shape="rect" coords="145,55,163,73" href="img/icons/flag_blue.gif" />';mapIcons+='<area shape="rect" coords="163,55,181,73" href="img/icons/flag_green.gif" />';mapIcons+='<area shape="rect" coords="181,55,199,73" href="img/icons/flag_orange.gif" />';mapIcons+='<area shape="rect" coords="199,55,217,73" href="img/icons/flag_pink.gif" />';mapIcons+='<area shape="rect" coords="217,55,235,73" href="img/icons/flag_purple.gif" />';mapIcons+='<area shape="rect" coords="235,55,253,73" href="img/icons/flag_red.gif" />';mapIcons+='<area shape="rect" coords="1,73,19,91" href="img/icons/flag_yellow.gif" />';mapIcons+='<area shape="rect" coords="19,73,37,91" href="img/icons/folder.gif" />';mapIcons+='<area shape="rect" coords="37,73,55,91" href="img/icons/heart.gif" />';mapIcons+='<area shape="rect" coords="55,73,73,91" href="img/icons/house.gif" />';mapIcons+='<area shape="rect" coords="73,73,91,91" href="img/icons/image.gif" />';mapIcons+='<area shape="rect" coords="91,73,109,91" href="img/icons/information.gif" />';mapIcons+='<area shape="rect" coords="109,73,127,91" href="img/icons/ipod.gif" />';mapIcons+='<area shape="rect" coords="127,73,145,91" href="img/icons/keyboard.gif" />';mapIcons+='<area shape="rect" coords="145,73,163,91" href="img/icons/layout.gif" />';mapIcons+='<area shape="rect" coords="163,73,181,91" href="img/icons/lightbulb.gif" />';mapIcons+='<area shape="rect" coords="181,73,199,91" href="img/icons/lightbulb_off.gif" />';mapIcons+='<area shape="rect" coords="199,73,217,91" href="img/icons/lock.gif" />';mapIcons+='<area shape="rect" coords="217,73,235,91" href="img/icons/lock_open.gif" />';mapIcons+='<area shape="rect" coords="235,73,253,91" href="img/icons/lorry.gif" />';mapIcons+='<area shape="rect" coords="1,91,19,109" href="img/icons/lorry_flatbed.gif" />';mapIcons+='<area shape="rect" coords="19,91,37,109" href="img/icons/magnifier.gif" />';mapIcons+='<area shape="rect" coords="37,91,55,109" href="img/icons/money.gif" />';mapIcons+='<area shape="rect" coords="55,91,73,109" href="img/icons/money_dollar.gif" />';mapIcons+='<area shape="rect" coords="73,91,91,109" href="img/icons/money_euro.gif" />';mapIcons+='<area shape="rect" coords="91,91,109,109" href="img/icons/money_pound.gif" />';mapIcons+='<area shape="rect" coords="109,91,127,109" href="img/icons/money_yen.gif" />';mapIcons+='<area shape="rect" coords="127,91,145,109" href="img/icons/monitor.gif" />';mapIcons+='<area shape="rect" coords="145,91,163,109" href="img/icons/mouse.gif" />';mapIcons+='<area shape="rect" coords="163,91,181,109" href="img/icons/music.gif" />';mapIcons+='<area shape="rect" coords="181,91,199,109" href="img/icons/new.gif" />';mapIcons+='<area shape="rect" coords="199,91,217,109" href="img/icons/note.gif" />';mapIcons+='<area shape="rect" coords="217,91,235,109" href="img/icons/page.gif" />';mapIcons+='<area shape="rect" coords="235,91,253,109" href="img/icons/page_copy.gif" />';mapIcons+='<area shape="rect" coords="1,109,19,127" href="img/icons/page_white.gif" />';mapIcons+='<area shape="rect" coords="19,109,37,127" href="img/icons/page_white_acrobat.gif" />';mapIcons+='<area shape="rect" coords="37,109,55,127" href="img/icons/page_white_code.gif" />';mapIcons+='<area shape="rect" coords="55,109,73,127" href="img/icons/page_white_compressed.gif" />';mapIcons+='<area shape="rect" coords="73,109,91,127" href="img/icons/page_white_excel.gif" />';mapIcons+='<area shape="rect" coords="91,109,109,127" href="img/icons/page_white_flash.gif" />';mapIcons+='<area shape="rect" coords="109,109,127,127" href="img/icons/page_white_php.gif" />';mapIcons+='<area shape="rect" coords="127,109,145,127" href="img/icons/page_white_picture.gif" />';mapIcons+='<area shape="rect" coords="145,109,163,127" href="img/icons/page_white_powerpoint.gif" />';mapIcons+='<area shape="rect" coords="163,109,181,127" href="img/icons/page_white_text.gif" />';mapIcons+='<area shape="rect" coords="181,109,199,127" href="img/icons/page_white_word.gif" />';mapIcons+='<area shape="rect" coords="199,109,217,127" href="img/icons/page_white_world.gif" />';mapIcons+='<area shape="rect" coords="217,109,235,127" href="img/icons/palette.gif" />';mapIcons+='<area shape="rect" coords="235,109,253,127" href="img/icons/paste_plain.gif" />';mapIcons+='<area shape="rect" coords="1,127,19,145" href="img/icons/pencil.gif" />';mapIcons+='<area shape="rect" coords="19,127,37,145" href="img/icons/phone.gif" />';mapIcons+='<area shape="rect" coords="37,127,55,145" href="img/icons/photo.gif" />';mapIcons+='<area shape="rect" coords="55,127,73,145" href="img/icons/picture.gif" />';mapIcons+='<area shape="rect" coords="73,127,91,145" href="img/icons/printer.gif" />';mapIcons+='<area shape="rect" coords="91,127,109,145" href="img/icons/printer_empty.gif" />';mapIcons+='<area shape="rect" coords="109,127,127,145" href="img/icons/rainbow.gif" />';mapIcons+='<area shape="rect" coords="127,127,145,145" href="img/icons/rosette.gif" />';mapIcons+='<area shape="rect" coords="145,127,163,145" href="img/icons/server.gif" />';mapIcons+='<area shape="rect" coords="163,127,181,145" href="img/icons/shield.gif" />';mapIcons+='<area shape="rect" coords="181,127,199,145" href="img/icons/sport_8ball.gif" />';mapIcons+='<area shape="rect" coords="199,127,217,145" href="img/icons/sport_basketball.gif" />';mapIcons+='<area shape="rect" coords="217,127,235,145" href="img/icons/sport_football.gif" />';mapIcons+='<area shape="rect" coords="235,127,253,145" href="img/icons/sport_golf.gif" />';mapIcons+='<area shape="rect" coords="1,145,19,163" href="img/icons/sport_raquet.gif" />';mapIcons+='<area shape="rect" coords="19,145,37,163" href="img/icons/sport_shuttlecock.gif" />';mapIcons+='<area shape="rect" coords="37,145,55,163" href="img/icons/sport_soccer.gif" />';mapIcons+='<area shape="rect" coords="55,145,73,163" href="img/icons/sport_tennis.gif" />';mapIcons+='<area shape="rect" coords="73,145,91,163" href="img/icons/star.gif" />';mapIcons+='<area shape="rect" coords="91,145,109,163" href="img/icons/stop.gif" />';mapIcons+='<area shape="rect" coords="109,145,127,163" href="img/icons/tag_blue.gif" />';mapIcons+='<area shape="rect" coords="127,145,145,163" href="img/icons/tag_green.gif" />';mapIcons+='<area shape="rect" coords="145,145,163,163" href="img/icons/tag_orange.gif" />';mapIcons+='<area shape="rect" coords="163,145,181,163" href="img/icons/tag_pink.gif" />';mapIcons+='<area shape="rect" coords="181,145,199,163" href="img/icons/tag_purple.gif" />';mapIcons+='<area shape="rect" coords="199,145,217,163" href="img/icons/tag_red.gif" />';mapIcons+='<area shape="rect" coords="217,145,235,163" href="img/icons/tag_yellow.gif" />';mapIcons+='<area shape="rect" coords="235,145,253,163" href="img/icons/telephone.gif" />';mapIcons+='<area shape="rect" coords="1,163,19,181" href="img/icons/television.gif" />';mapIcons+='<area shape="rect" coords="19,163,37,181" href="img/icons/thumb_down.gif" />';mapIcons+='<area shape="rect" coords="37,163,55,181" href="img/icons/thumb_up.gif" />';mapIcons+='<area shape="rect" coords="55,163,73,181" href="img/icons/time.png" />';mapIcons+='<area shape="rect" coords="73,163,91,181" href="img/icons/trash.gif" />';mapIcons+='<area shape="rect" coords="91,163,109,181" href="img/icons/tux.gif" />';mapIcons+='<area shape="rect" coords="109,163,127,181" href="img/icons/user.gif" />';mapIcons+='<area shape="rect" coords="127,163,145,181" href="img/icons/user_female.gif" />';mapIcons+='<area shape="rect" coords="145,163,163,181" href="img/icons/user_gray.gif" />';mapIcons+='<area shape="rect" coords="163,163,181,181" href="img/icons/user_green.gif" />';mapIcons+='<area shape="rect" coords="181,163,199,181" href="img/icons/user_orange.gif" />';mapIcons+='<area shape="rect" coords="199,163,217,181" href="img/icons/user_red.gif" />';mapIcons+='<area shape="rect" coords="217,163,235,181" href="img/icons/user_suit.gif" />';mapIcons+='<area shape="rect" coords="235,163,253,181" href="img/icons/vcard.gif" />';mapIcons+='<area shape="rect" coords="1,181,19,199" href="img/icons/weather_clouds.gif" />';mapIcons+='<area shape="rect" coords="19,181,37,199" href="img/icons/weather_cloudy.gif" />';mapIcons+='<area shape="rect" coords="37,181,55,199" href="img/icons/weather_lightning.gif" />';mapIcons+='<area shape="rect" coords="55,181,73,199" href="img/icons/weather_rain.gif" />';mapIcons+='<area shape="rect" coords="73,181,91,199" href="img/icons/weather_snow.gif" />';mapIcons+='<area shape="rect" coords="91,181,109,199" href="img/icons/weather_sun.gif" />';mapIcons+='<area shape="rect" coords="109,181,127,199" href="img/icons/world.gif" />';mapIcons+='<area shape="rect" coords="127,181,145,199" href="img/icons/zoom.gif" />';mapIcons+='<area shape="rect" coords="145,181,163,199" href="img/uwa.png" />';

var tabSetIcon=function(B,D){
	var C=App.tabList.length;var A=App.selectedTabObj;if(typeof B!="string"){B=this.src}if(!A){return false}if(D){document.getElementById("tabOptionIconLink").value=B}B=B.replace(/^http:\/\/.*\.?netvibes\.(com|local)\/img\/icon/,App.getStaticUrl("/img/icon"));if(A.dataObj.icon==B){return false}if($("tabOptionsIconPicker")){$("tabOptionsIconPicker").setStyle("display","none")}A.dataObj.icon=B;App.saveUserData("tab",A.dataObj);A.setTitle(null,true)};
	
App.setTabUnread=function(D,C,A){
	var B=null,E=App.tabList.length;var G=0;for(var F=0;F<E;F++){if(App.tabList[F].dataObj.id!=C){G+=App.tabList[F].unReadCache;continue}B=App.tabList[F]}if(B&&D>0){B.unRead[D]=parseInt(A,10);B.setTitle();G+=B.unReadCache}if(G>0){document.title=App.pageTitle+" ("+G+")"}else{document.title=App.pageTitle}};
	
var PageTab=function(obj){
	var self=this;
	this.dataObj=obj;this.elm=null;
	this.icon=new Image();
	this.hasBeenDragged=false;
	this.unRead={};this.unReadCache=0;
	var showEco=true;var showSendByMail=true;
	this.selectionMark=function(){
		if(!self.elm){
			return }
		if(App.selectedTab==self.dataObj.id){
			Element.addClassName(self.elm,"selected");
			self.dataObj.unread=self.unReadCache;
			App.openTabId=self.dataObj.id;
			if(App.visit&&App.visit.my){
				Cookie.set("opentab_u",App.openTabId,{duration:60})
			}else{
				if(!App.visit){Cookie.set("opentab",App.openTabId,{duration:60})
			}
		}
		}else{
			if(self.unReadCache>(self.dataObj.unread||0)){
				Element.removeClassName(self.elm,"selected")
			}else{
				Element.removeClassName(self.elm,"selected");
				var el=$(self.elm).getElement(".actions-tab-options");
				if(el){el.remove()}
			}
		}
	};
	this.hasModules=function(){
		var ln=App.moduleList.length;
		for(var z=0;z<ln;z++){if(App.moduleList[z].dataObj.tab==this.dataObj.id){return true}}return false
	};
	this.hasAllCollapsed=function(){
		var collapsed=0,count=0;for(var i=0,m;m=App.moduleList[i];i++){if(m.dataObj.tab==this.dataObj.id){if(m.dataObj.status==0){collapsed++}count++}}return(count&&collapsed==count)};
	this.remove=function(e){
		if(!e){e=window.event}e.cancelBubble=true;var confirmText=_('Do you really want to delete the tab "{0}"?').format(self.dataObj.title.unescapeHTML());if(self.dataObj.title.length==0){confirmText=_("Do you really want to delete this tab?")}var hasModules=self.hasModules();var ln=App.tabList.length;var alternative=null;for(var z=0;z<ln;z++){if(App.tabList[z]==self){break}alternative=App.tabList[z]}if(!alternative){alternative=App.tabList[z+1]}if(!alternative){alert(_("You cannot delete the only tab."));return false}mode="tabdelete_mod";if(e.altKey||e.shiftKey||e.metaKey){mode="tabdelete"}if(hasModules){if(mode=="tabdelete_mod"){confirmText+="\n("+_("all modules on this page will be DELETED!")+")"}else{confirmText+="\n("+_('all modules on this page will be moved to "{0}"').format(alternative.dataObj.title)+")"}}var confirmDialog=new App.UI.ConfirmDialog({titleText:self.dataObj.title.unescapeHTML(),message:confirmText,confirm:{text:_("Delete this tab")},discard:{text:""},onConfirm:function(){App.saveUserData(mode,{from:self.dataObj.id,to:alternative.dataObj.id});this.closeTabOptions()}.bind(this)}).show();return true};
	this.createImage=function(append,type){
		switch(type){case"close":var img=Netvibes.UI.createIcon("actions-tab-options",_("Tab options"),10,10);append.appendChild(img);break;case"spacer":var img=document.createElement("img");img.className="spacer meta";img.width=7;img.height=7;img.src=App.getStaticUrl(NV_PATH+"img/s.gif");append.appendChild(img);break}};
	this.publish=function(e,type){
		e.stop();if(arguments.callee.lastCall==type){$("shareModuleBalloon").destroy();delete arguments.callee.lastCall;return }else{arguments.callee.lastCall=type}if(!$("shareModuleBalloon")){arguments.callee.balloon=new Netvibes.UI.Balloon({id:"shareModuleBalloon"})}var balloon=arguments.callee.balloon;balloon.content.empty();switch(type){case"mail":text="<h3>"+_("Share this tab by e-mail")+"</h3>";text+='<form id="sendTabEmailForm">';text+="<p>";if(!App.registeredUser){text+="<label>"+_("Your e-mail address")+"<br/>";text+='<input class="email" type="text" id="myEmail" style="width:200px" value=""/></label><br/>'}text+="<label>"+_("Your friend's address")+"<br/>";text+='<input class="email" type="text" id="friendEmail" style="width:200px" value=""/></label><br/>';if(App.registeredUser){text+='<span class="hint">('+_("multiple addresses must be separated by commas")+")</span><br/>"}text+="</p>";text+='<p id="personalizeMail" style="display: none">';text+='<label for="mailTextInput">'+_("Your own text:")+'</label><br /><textarea id="mailTextInput"/></textarea>';text+="</p>";text+='<p id="personalizeLink">';text+='<a href="javascript:void(0)" id="personalizeMessage">'+_("Personalize the message")+"</a>";text+="</p>";text+='<div class="shareInfo">';text+='<div class="shareInfo">&nbsp;';text+='<label><input type="checkbox" id="sendTabPreconfigured" /> ';text+=_("Share all modules <b>pre-configured</b>.");text+="</label></div>";text+='<p style="margin:0;padding: 4px;">'+_("Please note that all modules connected to a user account (gmail,&nbsp;ebay,&nbsp;...) can not be shared preconfigured for security reasons.")+"</p>";text+="</div>";text+='<p style="float: right;text-align:right"><input type="submit" value="'+_("Send")+'" id="sendTabSubmit" /></p>';text+='<p style="padding-left:5px;"><label><input type="checkbox" id="sendTabCopyByMail" /> '+_("send me a copy of the e-mail")+"</label></p>";text+="</form>";balloon.content.set("html",text);mailText=_("Hi")+"\n\n"+_("Just wanted to show you this tab on Netvibes. Click on the link to add it to your page.")+"\n\n"+_("Best,")+" ";if(typeof User.username!="undefined"){mailText+=User.username}else{if(typeof User.email!="undefined"){mailText+=User.email}else{mailText+=_("Your Netviber")}}var m=$("mailTextInput");m.value=mailText;m.style.width="370px";m.style.height="150px";$("personalizeMessage").addEvent("click",function(){balloon.smWindow.style.width="400px";if(balloon.smWindow.className=="balloonRight"){balloon.smWindow.style.left=(parseInt(balloon.smWindow.style.left,10)-100)+"px"}$("personalizeMail").style.display="block";$("personalizeLink").style.display="none"});var sendMail=function(evt){evt.stop();var s=$("sendTabSubmit");s.disabled=true;var t="";var data="";if(!App.registeredUser){fromemail=$("myEmail").value;if(!String.isEmail(fromemail)){alert(_("Your own e-mail address is not valid"));s.disabled=false;e.stop();return false}data+=t+"myEmail="+fromemail;t="&"}var friendEmails=[];email=$("friendEmail").value;emails=email.split(",");var ln=emails.length;if(ln>5){ln=5}for(i=0;i<ln;i++){email=emails[i].trim();if(!String.isEmail(email)){alert(_("Your friend's e-mail address ({0}) is not valid").format(email));s.disabled=false;e.stop();return false}friendEmails.push(email)}data+=t+"friendEmail="+friendEmails.join(",");t="&";data+="&tab="+obj.id;if($("personalizeMail").style.display=="block"){mailText=$("mailTextInput").value}var preconfigured=false;if($("sendTabPreconfigured").checked){data+="&preconfigured=1";preconfigured=true}if($("sendTabCopyByMail").checked){data+="&sendCopy=1"}data+="&mailText="+encodeURIComponent(mailText);if(App.visit&&App.visit.id){data+="&visit="+App.visit.id}App.Request.sendPOST(NV_PATH+"ajax/sendModule/send.php",data,function(r){if(r.responseText=="success"){var m=(preconfigured)?_("This tab has been successfully sent (with current settings of the modules) to:"):_("This tab has been successfully sent to:");balloon.content.empty();balloon.content.set("html","<p>"+m+"</p><ul><li>"+emails.join("</li><li>")+'</li></ul><p><a href="javascript:void(0)">'+_("Close this window")+"</a></p>");$(balloon.content.getElementsByTagName("a")[0]).addEvent("click",balloon.hide.bindWithEvent(balloon))}else{balloon.content.empty();balloon.content.set("html",'<p style="color:#A00;">'+_("An error happened while sending the tab.")+'</p><p><a href="javascript:void(0)">'+_("Wait a moment and try again")+"</a></p>");$(balloon.content.getElementsByTagName("a")[0]).addEvent("click",function(ev){ev.stop();this.publish(e,"mail");return false}.bind(this))}}.bind(this));return false}.bind(this);$("sendTabEmailForm").addEvent("submit",sendMail);break;case"im":balloon.smWindow.style.width="370px";if(balloon.smWindow.className=="balloonRight"){balloon.smWindow.style.left=(parseInt(smWindow.style.left,10)-100)+"px"}text="<h3>"+_("Share this tab by instant messaging")+"</h3>";text+="<form>";text+="<p>";text+='<a href="aim:"><img src="/img/sendModule/aim.gif" style="border: 0" /></a>';text+='<a href="skype:"><img src="/img/sendModule/skype.gif" style="border: 0" /></a>';text+='<a href="msnim:chat?"><img src="/img/sendModule/msn.gif" style="border: 0" /></a>';text+='<a href="gtalk:"><img src="/img/sendModule/gtalk.gif" style="border: 0" /></a>';text+='<a href="ymsgr:"><img src="/img/sendModule/yahoo.gif" style="border: 0" /></a>';text+='<a href="#" id="sendViaTwitter"><img src="/img/sendModule/twitter.gif" style="border: 0" /></a>';text+="</p>";text+="<p>";text+=_("Choose this link in your favorite instant messaging application:");text+="</p>";text+='<p class="shareInfo">';text+='<label><input type="checkbox" id="sendTabPreconfigured" /> ';text+=_("Share all modules <b>pre-configured</b>.")+"</label><br/>";text+='<input class="text url" type="text" value="" id="link-input" size="50" /><br/>';text+='<a href="javascript:void(0)" id="copy-link">'+_("Right click and copy this link")+"</a></label><br/>";text+="</p>";text+="</form>";text+="<p>"+_("Please note that all modules connected to a user account (gmail,&nbsp;ebay,&nbsp;...) can not be shared preconfigured for security reasons.")+"</p>";balloon.content.set("html",text);var setIMlink=function(){if($("sendTabPreconfigured").checked){$("link-input").value=linkFor.preconfiguredLink;$("copy-link").href=linkFor.preconfiguredLink;if($("twitter-textarea")){$("twitter-textarea").value=$("twitter-textarea").value.replace(linkFor.sendLink,linkFor.preconfiguredLink);$("twitter-textarea").onkeyup()}return }$("link-input").value=linkFor.sendLink;$("copy-link").href=linkFor.sendLink;if($("twitter-textarea")){$("twitter-textarea").value=$("twitter-textarea").value.replace(linkFor.preconfiguredLink,linkFor.sendLink);$("twitter-textarea").onkeyup()}};$("sendTabPreconfigured").addEvent("click",setIMlink);$("link-input").value=_("Loading...");var pdata="preconfigure_tab="+obj.id;if(App.visit&&App.visit.id){pdata+="&visit="+App.visit.id}var linkFor={};App.Request.sendPOST(NV_PATH+"ajax/sendModule/store.php",pdata,function(r){var er=false;if(r.responseText=="error"){er=true}var x=r.responseText.parseJSON();if(!x[0]||!x[1]){er=true}if(er){balloon.content.empty();balloon.content.set("html",'<p style="color:#A00;">'+_("An error happened while creating the links.")+'</p><p><a href="javascript:void(0)">'+_("Wait a moment and try again")+"</a></p>");$(balloon.content.getElementsByTagName("a")[0]).addEvent("click",function(ev){ev.stop();this.publish(e,"im");return false}.bind(this));return false}else{linkFor.sendLink=x[0];linkFor.preconfiguredLink=x[1];setIMlink()}}.bind(this));$("link-input").addEvent("click",function(e){var link=$("sendTabPreconfigured").checked?linkFor.preconfiguredLink:linkFor.sendLink;if(window.clipboardData){window.clipboardData.setData("Text",link)}$("link-input").focus();$("link-input").select()});$("copy-link").addEvent("click",function(e){e.stop();var link=$("sendTabPreconfigured").checked?linkFor.preconfiguredLink:linkFor.sendLink;if(window.clipboardData){window.clipboardData.setData("Text",link)}return false});$("sendViaTwitter").addEvent("click",function(e){e.stop();if($("twitter-login")||!$("link-input").value){return }var div=new Element("div").set("html",'<br/><img src="/img/sendModule/twitter.gif" style="border:0;float:left;" /><b style="display: block; margin-top: 4px;">'+_("Post this link on your twitter")+'</b><p style="clear:both;"">'+_("Enter your twitter login: ")+'<input id="twitter-login" type="text" name="username_or_email"><br/>'+_("Enter your twitter password: ")+'<input id="twitter-password" type="password"></p><p align="right">'+_("Characters available:")+' <b><span id="twitter-available">140</span></p></b><p align="center"><textarea id="twitter-textarea" style="width:340px" rows="4"">'+_("Check this Netvibes tab:")+" "+$("link-input").value+'</textarea><br/><input id="link-twitter-input" type="button" value="'+_("Update")+'" /></p><p class="message" id="twitter-message></p>').inject(balloon.content);$("twitter-textarea").addEvent("keypress",function(e){return(e.which==8)||(this.value.length<140)});$("twitter-textarea").addEvent("keyup",function(e){$("twitter-available").innerHTML=140-this.value.length});$("twitter-textarea").fireEvent("keyup");$("link-twitter-input").addEvent("click",function(e){e.stop();if($("twitter-textarea").value.length>140){alert(_("Message too long"));return false}$("link-twitter-input").value=_("Updating...");$("link-twitter-input").disabled="disabled";var data="";data+="tab="+obj.id;data+="&login="+$("twitter-login").value;data+="&pass="+$("twitter-password").value;data+="&message="+$("twitter-textarea").value;if(App.visit&&App.visit.id){data+="&visit="+App.visit.id}$("twitter-message").innerHTML=_("Be patient, this could take up to one minute.");App.Request.sendPOST(NV_PATH+"ajax/sendModule/twitter.php",data,function(r){try{r=eval("("+r.responseText+")")}catch(e){$("twitter-message").innerHTML=_("Error: check your login/password");$("link-twitter-input").value=_("Update");$("link-twitter-input").disabled="";return }var url="http://www.twitter.com/"+r.user.screen_name;$("twitter-message").innerHTML=_("Your twitter has been updated: ")+"<a href='"+url+"' target='_blank'>"+url+"</a>";$("link-twitter-input").value=_("Update");$("link-twitter-input").disabled="";return });return false})}.bindWithEvent(this));break;case"blog":balloon.smWindow.style.width="370px";if(balloon.smWindow.className=="balloonRight"){balloon.smWindow.style.left=(parseInt(balloon.smWindow.style.left,10)-100)+"px"}text="<h3>"+_("Share on my blog")+"</h3>";text+="<form>";text+="<p>";text+=_("Copy the following HTML code into your blog:");text+="</p>";text+='<p class="shareInfo">';text+='<label><input type="checkbox" id="sendTabPreconfigured" /> ';text+=_("Share all modules <b>pre-configured</b>")+"</label><br/>";text+='<textarea id="html-box" rows="5" cols="30" style="width: 330px"> </textarea><br />';text+='<a href="javascript:void(0)" id="select-all-box">'+_("Select all")+"</a></label><br/>";text+="</p>";text+='<p id="html-box-preview">';text+="</p>";text+="</form>";text+="<p>"+_("Please note that all modules connected to a user account (gmail,&nbsp;ebay,&nbsp;...) can not be shared preconfigured for security reasons.")+"</p>";balloon.content.set("html",text);var setHTMLcode=function(){var link=linkFor.sendLink;if($("sendTabPreconfigured").checked){link=linkFor.preconfiguredLink}link='<a href="'+link+'" target="_blank"><img src="http://www.netvibes.com/img/add2netvibes.gif" border="none" width="91" height="17" alt="Add to Netvibes" /></a>';if(Browser.isSafari){$("html-box").firstChild.nodeValue=link}else{$("html-box").value=link}$("html-box-preview").innerHTML=_("Preview of the button:")+" "+link};$("sendTabPreconfigured").addEvent("click",setHTMLcode);$("html-box").firstChild.nodeValue=_("Loading...");var pdata="preconfigure_tab="+obj.id;if(App.visit&&App.visit.id){pdata+="&visit="+App.visit.id}var linkFor={};App.Request.sendPOST(NV_PATH+"ajax/sendModule/store.php",pdata,function(r){var er=false;if(r.responseText=="error"){er=true}var x=r.responseText.parseJSON();if(!x[0]||!x[1]){er=true}if(er){balloon.content.empty();balloon.content.set("html",'<p style="color:#A00;">'+_("An error happened while creating the links.")+'</p><p><a href="javascript:void(0)">'+_("Wait a moment and try again")+"</a></p>");$(balloon.content.getElementsByTagName("a")[0]).addEvent("click",function(ev){ev.stop();this.publish(e,"blog");return false}.bind(this));return false}else{linkFor.sendLink=x[0];linkFor.preconfiguredLink=x[1];setHTMLcode()}}.bind(this));var selectAllHTML=function(){$("html-box").focus();$("html-box").select()};$("html-box").addEvent("click",selectAllHTML);$("select-all-box").addEvent("click",selectAllHTML);break}balloon.show(e)};
	this.closeTabOptions=function(){
		var tabOptions=$("tabOptions");if(App.userCustom.enableFx==1&&!App.isPremium()){tabOptions.slide("out")}else{tabOptions.hide()}if($("shareModuleBalloon")){Element.remove($("shareModuleBalloon"))}};
	this.createTabOptions=function(){
		var tabOptions=$("tabOptions");var container=new Element("div",{"class":"tabOptionsContainer tabOptionsInner autoclear",id:"tabOptionsContainerDefault"});$(Netvibes.UI.createIcon("actions-window-close close",_("Close"),16,16)).addEvent("click",this.closeTabOptions).inject(container);var tabOptionsTitle=new Element("ul",{"class":"tabOptionsTab"}).inject(container);new Element("li",{text:_("Tab options")}).inject(tabOptionsTitle);new Element("div",{"class":"option"}).grab(new Element("div",{"class":"content",html:'<div class="title">'+_("Rename")+"</div>"})).grab(new Element("div",{"class":"action"}).grab(new Element("input",{id:"tabOptionsRename",type:"text","class":"text",events:{keyup:function(e){var value=this.value.trim().escapeHTML();App.selectedTabObj.setTempTitle(value);if(!Browser.isSafari){if(e.key=="enter"||e.key=="esc"){this.blur()}}},blur:function(e){var value=this.value.trim().escapeHTML();var self=App.selectedTabObj;if(self.dataObj.title==value){return }self.elm.title=value;self.dataObj.title=value;App.saveUserData("tab",self.dataObj);if(Browser.isSafari&&Browser.version<3){}else{if(value==""){document.location="#"+self.dataObj.id}else{document.location="#"+encodeURIComponent(String.toAnchor(self.dataObj.title))}}self.setTitle()}}})).grab(new Element("div",{"class":"desc",html:_("Change the name of this tab")}))).inject(container);new Element("div",{"class":"option",html:'<div class="content"><div class="title">'+_("Number of columns")+'</div><div id="tabOptionsColumns" class="action"><button class="nv-button">1</button><button class="nv-button">2</button><button class="nv-button">3</button><button class="nv-button">4</button></div><div class="desc">'+_("Change the number of columns")+"</div></div>"}).inject(container);var radio_noIcon=new Element("input",{type:"radio",name:"radioSelectTabIcon",id:"radioSelectTabIconNoIcon"});var radio_iconSelect=new Element("input",{type:"radio",name:"radioSelectTabIcon",id:"radioSelectTabIconSelect"});var radio_iconUrl=new Element("input",{type:"radio",name:"radioSelectTabIcon",id:"radioSelectTabIconUrl"});var input_iconUrl=new Element("input",{type:"text",id:"tabOptionIconLink"});var submit_iconUrl=new Element("input",{type:"button",value:_("Go")});var map=new Element("map",{id:"tabOptionIcons",name:"tabOptionIcons"}).setHTML(mapIcons).inject(document.body);var tabIconMap=new Element("img",{src:App.getStaticUrl(NV_PATH+"img/tabicons.png?v=123"),id:"tabOptionsIconPicker",useMap:"#tabOptionIcons",styles:{cursor:"pointer",display:"none",position:"absolute",height:"200px",width:"254px",background:"#FFF",padding:"5px","z-index":9000}}).inject(document.body);var noIcon=function(){if(!radio_noIcon.checked){return }tabSetIcon("")};var iconSelect=function(){if(!radio_iconSelect.checked){return }tabIconMap.setStyle("display","block");var pos=this.getPosition();tabIconMap.setStyle("left",pos.x);tabIconMap.setStyle("top",pos.y+15);var overlay=$("nv-overlay");if(!overlay){overlay=new Element("div",{id:"nv-overlay","class":"overlay_dialog",styles:{display:"none",position:"absolute",top:"0",left:"0"}}).addEvent("click",function(){tabIconMap.setStyle("display","none");overlay.setStyle("display","none")}).inject(document.getElementsByTagName("BODY")[0])}var width=Browser.getDocumentWidth();var height=Browser.getDocumentHeight();if(height<Browser.getClientHeight()){height=Browser.getClientHeight()}overlay.style.width=width+"px";overlay.style.height=height+"px";if(Browser.isOpera&&Browser.version<9){overlay.style.background="none"}overlay.setStyle("opacity",0.4);overlay.setStyle("display","block")};var iconUrl=function(){if(!radio_iconUrl.checked){return }tabSetIcon(input_iconUrl.value,true)};radio_noIcon.addEvent("click",noIcon);radio_iconSelect.addEvent("click",iconSelect);radio_iconUrl.addEvent("click",iconUrl);submit_iconUrl.addEvent("click",function(){tabSetIcon(input_iconUrl.value,true);radio_iconUrl.set("checked","checked")});var areas=$A(map.getElementsByTagName("area"));areas.each(function(area){$(area).addEvent("click",function(){tabSetIcon(this.href);radio_iconSelect.set("checked","checked");tabIconMap.setStyle("display","none");if($("nv-overlay")){Element.hide($("nv-overlay"))}return false})});new Element("div",{"class":"option"}).grab(new Element("div",{"class":"content",html:'<div class="title">'+_("Icons")+"</div>"})).grab(new Element("fieldset",{"class":"icons"}).grab(radio_noIcon).grab(new Element("label",{html:_("No icon"),"for":radio_noIcon.id}).addEvent("click",noIcon)).grab(new Element("br")).grab(radio_iconSelect).grab(new Element("label",{html:_("Select an icon"),"for":radio_iconSelect.id}).addEvent("click",iconSelect)).grab(new Element("br")).grab(radio_iconUrl).grab(new Element("label",{html:_("url:"),"for":radio_iconUrl.id}).addEvent("click",iconUrl)).grab(input_iconUrl).grab(submit_iconUrl)).inject(container);var div=document.createElement("div");div.className="option";div.innerHTML="<div class='content'><div class='title'>"+_("Share")+"</div><ul class='share'><li class='email'><a href='#'>"+_("Send by e-mail")+"</a></li><li class='im'><a href='#'>"+_("Share by IM with a link")+"</a></li><li class='blog'><a href='#'>"+_("Share on my blog")+"</a></li></ul></div>";var as=div.getElementsByTagName("a");if(!App.registeredUser){as[0].onmouseover=function(){new App.toolTip(this,_("this option is for netvibes members, registrer now it's free!"),450,"left")};as[0].onclick=function(){return false}}else{$(as[0]).addEvent("click",App.selectedTabObj.publish.bindWithEvent(this,"mail"))}$(as[1]).addEvent("click",App.selectedTabObj.publish.bindWithEvent(this,"im"));$(as[2]).addEvent("click",App.selectedTabObj.publish.bindWithEvent(this,"blog"));container.appendChild(div);var div=new Element("div").addClass("option");if(App.visit&&App.visit.my){div.innerHTML="<div class='content'><div class='title'>"+_("Send to my private page")+'</div><div class="action" id="sendTabToPage-action"><button class="nv-button">'+_("Send")+'</button></div><div class="action" id="sendTabToPage-message"></div>'}else{div.innerHTML="<div class='content'><div class='title'>"+_("Send to my universe")+'</div><div class="action" id="sendTabToPage-action"><button class="nv-button">'+_("Send")+'</button></div><div class="action" id="sendTabToPage-message"></div>'}if(!User.username){div.addClass("disabled")}else{div.getElement("button").onclick=function(e){var self=this;self.innerHTML=_("Loading...");function getDataString(d,suffix){if(typeof suffix=="undefined"){suffix=""}var dataObjStr="";for(var n in d){if(typeof d.hasOwnProperty!="string"&&!d.hasOwnProperty(n)){continue}if(typeof d[n]=="function"){continue}if(n=="oldData"||n=="oldQuery"){continue}if(App.isOnSearch){if(n=="search"){if(obj.extendSearch==0){var value=d[n]}else{var value=d.oldQuery}}else{if(obj.moduleName=="Weather"&&n=="town"&&obj.extendSearch==1){var value=d.oldData}else{var value=d[n]}}}else{var value=d[n]}dataObjStr+="&arrData"+suffix+"["+n+"]="+encodeURIComponent(value)}return dataObjStr}var tab=App.selectedTabObj.dataObj;var data="title_tab="+encodeURIComponent(tab.title)+"&sort_tab="+tab.sort+"&icon_tab="+encodeURIComponent(tab.icon)+"&cols_tab="+tab.cols+"&columnSizes_tab="+tab.columnSizes.join(",");var modules=[];var ln=App.moduleList.length;for(var i=0;i<ln;i++){if(App.moduleList[i].dataObj.tab==tab.id){modules.push(App.moduleList[i])}}var ln=modules.length;for(var i=0;i<ln;i++){var obj=modules[i].dataObj;dataObjStr=getDataString(obj.data,"_mod"+i);if(typeof obj.title=="undefined"){obj.title=""}data+="&title_mod"+i+"="+encodeURIComponent(obj.title)+"&name_mod"+i+"="+encodeURIComponent(obj.moduleName)+"&status_mod"+i+"=1&col_mod"+i+"="+obj.container+"&row_mod"+i+"="+obj.row+"&share_mod"+i+"=0"+dataObjStr}if(!App.visit){data+="&universe=1"}data+="&mode=tab";App.Request.sendPOST(NV_PATH+"ajax/addToMyPage/add.php",data,function(response){if(response.responseText=="success"){if(App.visit){$("sendTabToPage-message").innerHTML="<img src='/img/ok.png' />"+_("Successfully added to my private page")}else{$("sendTabToPage-message").innerHTML="<img src='/img/ok.png' />"+_("Successfully added to my universe")}$("sendTabToPage-message").style.display="block";$("sendTabToPage-action").style.display="none"}})}}container.appendChild(div);var div=new Element("div");div.className="option";div.innerHTML="<div class='content'><div class='title'>"+_("Delete")+'</div><div class="action"><button class="nv-button">'+_("Delete")+"</button></div></div>";div.getElementsByTagName("button")[0].onclick=function(e){if(App.selectedTabObj.remove(e)){}};container.appendChild(div);tabOptions.appendChild(container);var container=new Element("div");container.className="tabOptionsContainer";container.id="tabOptionsContainerSharing";container.setStyle("display","none");var div=new Element("div");div.className="option";div.innerHTML="<div class='content'><div class='title'>"+_("Status")+"</div><button>"+_("Public / Private")+"</button></div>";div.getElementsByTagName("button")[0].onclick=function(e){alert("todo")};container.appendChild(div);var div=new Element("div");div.className="tabOptionsDiv2";div.innerHTML="<div class='content'><div class='title'>"+_("Send to a friend")+"</div><input type='text'><br/><input type='checkbox' /> "+_("send me a copy")+" <button>"+_("Send")+"</button></div>";container.appendChild(div);var div=new Element("div");div.className="tabOptionsDiv2";div.innerHTML="<div class='content'><div class='title'>"+_("Already sent to")+"</div>_________ X ________ X</div>";container.appendChild(div);var br=new Element("br");br.setStyle("clear","both");container.appendChild(br);tabOptions.appendChild(container)};
	updateTabOptions=function(myself){
		$("tabOptionsContainerSharing").setStyle("display","none");$("tabOptionsContainerDefault").setStyle("display","block");$("tabOptionsRename").value=myself.dataObj.title.unescapeHTML();$$("#tabOptionsColumns button").each(function(button){if(button.innerHTML==myself.dataObj.cols){button.disabled="disabled";button.className="nv-button-pressed"}else{button.disabled="";button.className="nv-button"}button.onclick=function(e){var newNumber=this.innerHTML;$$("#tabOptionsColumns button").each(function(button){if(button.innerHTML==newNumber){button.disabled="disabled";button.className="nv-button-pressed"}else{button.disabled="";button.className="nv-button"}});var not_empty=false;var ln=App.moduleList.length;for(var z=0;z<ln;z++){if(App.moduleList[z].dataObj.tab==App.selectedTab&&App.moduleList[z].dataObj.container>newNumber){not_empty=true;break}}if(not_empty){if(confirm(_("You have content on a column that would be removed. Should we move it for you?"))){var m=null;var module_moved=null;for(var z=0;z<ln;z++){m=App.moduleList[z];if(m.dataObj.tab==App.selectedTab&&m.dataObj.container>newNumber){Element.remove(m.elm_module);App.ColManager["col"+newNumber].appendChild(m.elm_module);m.dataObj.container=newNumber;module_moved=m}}if(module_moved){App.saveUserData("order",{col:newNumber,order:App.LayoutManager.getResetColumnOrder(module_moved)})}}else{return false}}myself.dataObj.cols=newNumber;App.userCustom.numCol=myself.dataObj.cols;App.ColManager.numCols=myself.dataObj.cols;App.ColManager.columnSizes=myself.dataObj.columnSizes;App.ColManager.resetLayout();App.saveUserData("tab",myself.dataObj)}});if(myself.dataObj.icon&&myself.dataObj.icon!=""){$("tabOptionIconLink").value=myself.dataObj.icon;$("radioSelectTabIconUrl").set("checked","checked")}else{$("tabOptionIconLink").value="";$("radioSelectTabIconNoIcon").set("checked","checked")}$("sendTabToPage-action").firstChild.innerHTML=_("Send");$("sendTabToPage-action").style.display="block";$("sendTabToPage-message").style.display="none"};
	this.saveTimeout=null;this.save=function(){
		if(self.saveTimeout){clearTimeout(self.saveTimeout)}self.saveTimeout=setTimeout(function(){App.saveUserData("tab",self.dataObj)},1500)};
	this.unShare=function(){};
	this.showTabOptions=function(e){
		if(App.selectedTab!=self.dataObj.id&&App.staticUniverse){return }if(!e){e=window.event}if(e){e.cancelBubble=true}if($("shareModuleBalloon")){Element.remove($("shareModuleBalloon"))}App.hideModulePopupMenu();var tabOptions=$("tabOptions");if(tabOptions.innerHTML==""){self.createTabOptions()}if(App.userCustom.enableFx==1){tabOptions.slide("toggle")}else{tabOptions.style.display=(tabOptions.style.display!="none")?"none":""}if(self.hasBeenDragged){self.hasBeenDragged=false;return }updateTabOptions(self)};
	this.rename=function(){
		App.keyboardFocus="tab.edit";self.elm.innerHTML="";var span=document.createElement("span");span.className="innerTab";self.elm.appendChild(span);var t=self.dataObj.title.unescapeHTML();var inputElm=document.createElement("input");inputElm.type="text";inputElm.value=t;inputElm.style.width=((t.length*6)+20)+"px";inputElm.setAttribute("maxlength",50);span.appendChild(inputElm);self.createImage(span,"spacer");inputElm.focus();inputElm.select();function onEnterDown(e){e=new Event(e);if(!Browser.isSafari){if(e.key=="enter"||e.key=="esc"){inputElm.onblur()}}}if(self.dataObj.id<0){App.saveUserData("newtab",self.dataObj)}Event.observe(inputElm,"keydown",onEnterDown,false);inputElm.onkeyup=function(){App.keyboardFocus="tab.edit";this.style.width=(this.value.length*6)+20+"px"};inputElm.onmousedown=function(e){if(!e){e=window.event}e.cancelBubble=true;return true};inputElm.onblur=function(e){var value=this.value.trim().escapeHTML();if(value!=self.dataObj.title){self.elm.title=value;self.dataObj.title=value;App.saveUserData("tab",self.dataObj);if(Browser.isSafari&&Browser.version<3){}else{if(value==""){document.location="#"+self.dataObj.id}else{document.location="#"+encodeURIComponent(String.toAnchor(self.dataObj.title))}}}App.tabEditing=-1;App.keyboardFocus="module";App.retainKeyboardFocus();self.setTitle();return true};App.tabEditing=self.elm.id};
	this.setTempTitle=function(tempTitle){
		return this.setTitle(false,false,tempTitle)};
	this.setTitle=function(el,rebuild,tempTitle){
		if(!el){el=self.elm}if(App.tabEditing==el.id){return false}var icon,title,unread;if(typeof rebuild=="undefined"){rebuild=false}if(!rebuild){try{var img=el.getElementsByTagName("img");if(img.length<1||img[0].className!="icon"){throw ("rebuild")}var span=el.getElementsByTagName("span");if(span.length<1||span[0].className!="innerTab"){throw ("rebuild")}innerTabSpan=span[0];var span=el.getElementsByTagName("span");if(span.length<2||span[1].className!="tabName"){throw ("rebuild")}if(!App.isOnSearch){if(span.length<3||span[2].className!="unread"){throw ("rebuild")}}else{if(span.length<3||span[2].className!="result"){throw ("rebuild")}}}catch(e){rebuild=true}}if(rebuild){el.innerHTML="";var innerTabSpan=document.createElement("span");innerTabSpan.className="innerTab";el.appendChild(innerTabSpan);icon=document.createElement("img");icon.className="icon";if(!document.all||window.opera){icon.style.marginLeft="-3px"}innerTabSpan.appendChild(icon);var title=document.createElement("span");title.className="tabName";title.onclick=function(e){if(!e){e=window.event}e.cancelBubble=true;tabOnClick("rename")};innerTabSpan.appendChild(title);var unread=document.createElement("span");if(App.isOnSearch){unread.className="result"}else{unread.className="unread"}if(!App.isOnSearch){unread.onclick=function(e){var myId=this.parentNode.parentNode.id.substr(3);if(App.selectedTab!=myId){return true}if(!e){e=window.event}e.cancelBubble=true;if(!confirm(_("Really mark all rss items on this tab as read?"))){return false}var ln=App.moduleList.length;for(var z=0;z<ln;z++){var m=App.moduleList[z];if(m.dataObj.tab!=myId){continue}if(m.content&&typeof m.content.setAllAsReadOnMouseDown=="function"){m.content.setAllAsReadOnMouseDown()}}App.selectedTabObj.setTitle();m=null;if(App.FeedReader.isOpen){App.FeedReader.readAll()}}}innerTabSpan.appendChild(unread)}else{var img=innerTabSpan.getElementsByTagName("img");icon=img[0];var span=innerTabSpan.getElementsByTagName("span");title=span[0];unread=span[1]}if(self.dataObj.icon!=""){s=self.icon.src;s=s.replace(/^http:\/\/.*\.?netvibes\.(com|local)\/img\/icon/,App.getStaticUrl(NV_PATH+"img/icon"))}else{s=App.getStaticUrl(NV_PATH+"img/s.gif")}if(icon.src.indexOf(s)==-1){if(s.trim()==""){s=App.getStaticUrl(NV_PATH+"img/s.gif")}if(self.dataObj.icon!=""){icon.onclick=function(){if(self.dataObj.id==App.selectedTab){self.showTabOptions}};icon.style.width="16px";icon.width=16;icon.style.width="16px";icon.style.height="16px";var cssSprite;if(cssSprite=App.iconMapper(self.dataObj.icon)){icon.src=App.getStaticUrl(NV_PATH+"img/s.gif");icon.style.backgroundPosition="-"+cssSprite[1]+"px -"+cssSprite[2]+"px";icon.style.backgroundImage="url('"+App.getStaticUrl(NV_PATH+cssSprite[0])+"')"}else{icon.src=self.dataObj.icon;icon.style.backgroundPosition=0;icon.style.backgroundImage=""}}else{icon.style.width="1px";icon.width=1;icon.src=s}}var t=self.dataObj.title;if(typeof tempTitle!="undefined"){t=tempTitle}if(t==""){t="\u00a0"}if(title.innerHTML!=t){title.title=t.unescapeHTML();title.innerHTML=t}t=0;var c=0;for(var i in self.unRead){c=parseInt(self.unRead[i],10);if(!isNaN(c)){t+=c}}self.unReadCache=t;if(!App.staticUniverse&&t>0){if(unread.innerHTML!="("+t+")"){if(!App.isOnSearch){unread.title=_("Read All")}else{unread.title=_("Results")}unread.innerHTML="("+t+")"}Element.removeClassName(unread,"nounread")}else{unread.innerHTML=""}self.selectionMark();while(el.lastChild.tagName&&el.lastChild.tagName.toLowerCase()=="img"){Element.remove(el.lastChild)}if(!App.staticUniverse&&App.selectedTab&&App.selectedTab==self.dataObj.id){if(el.getElementsByClassName("actions-tab-options").length==0){this.createImage(el.firstChild,"close")}}};
	this.showMessage=function(msg){};
	this.getModules=function(){
		return App.moduleList.filter(function(module){return module.dataObj.tab==this.dataObj.id},this)};
	this.isPrefetchable=function(){
		if(!(parseInt(App.userCustom.dontPreload)==1&&App.use_prefetcheddata===true)){return false}return App.moduleList.some(function(module){return module.dataObj.tab==this.dataObj.id&&["RssReader","MultipleFeeds","UWA"].contains(module.dataObj.moduleName)},this)};
	this.loadModules=function(){
		var modules=this.getModules();if(!this.loaded){modules=App.Modules.sortModulesByRow(modules);for(var i=0,module;module=modules[i];i++){var saveOrder=false;if(module.dataObj.container>this.dataObj.cols){module.dataObj.container=this.dataObj.cols;saveOrder=true}if(module.dataObj.tab!=App.selectedTab){module.hide()}module.load(true);if(saveOrder){App.saveUserData("order",module)}}this.loaded=true}return modules};
	this.switchTo=function(firstRun){
		if(this.loaded&&App.selectedTab==this.dataObj.id){return }if(App.FeedReader.isOpen){App.FeedReader.close()}var shareModuleBalloon=$("shareModuleBalloon");if(shareModuleBalloon){Element.remove(shareModuleBalloon)}if(App.hideModulePopupMenu){App.hideModulePopupMenu()}var lastSelected=App.selectedTab;App.selectedTab=this.dataObj.id;try{if(App.selectedTabObj){App.selectedTabObj.setTitle();App.selectedTabObj.selectionMark()}var previousModules=App.selectedTabObj.getModules();for(var i=0,l=previousModules.length;i<l;i++){var module=previousModules[i];if(module.elm_module&&module.isVisible()&&module.elm_module.isDragging){continue}module.hide()}}catch(e){}App.selectedTabObj=this;this.setTempTitle(_("Loading ..."));App.userCustom.numCol=this.dataObj.cols;App.ColManager.columnSizes=this.dataObj.columnSizes;App.ColManager.numCols=this.dataObj.cols;App.ColManager.updateLayout(false);var modules=null;if(!this.loaded){if(!firstRun&&this.isPrefetchable()){App.Request.newRequest({url:"/ajax/tab/prefetch.php",onSuccess:function(data){eval(data);this.loadModules()}.bind(this)}).get({tab:this.dataObj.id})}else{modules=this.loadModules()}}else{modules=this.getModules()}if(!modules){modules=this.getModules()}for(var i=0,l=modules.length;i<l;i++){modules[i].show(true);modules[i].reportView()}this.setTitle();this.closeTabOptions();var collapseExpand=$("collapseExpand");if(collapseExpand){collapseExpand.rel=this.hasAllCollapsed()?"expand":"collapse";App.collapseExpand()}App.Modules.notifyResize(true);if(Browser.isSafari&&Browser.version<3){}else{if(this.dataObj.title==""){document.location="#"+this.dataObj.id}else{document.location="#"+encodeURIComponent(String.toAnchor(this.dataObj.title))}}};
	function tabOnClick(action){
		if(self.hasBeenDragged){self.hasBeenDragged=false;return }if(typeof action=="undefined"){action="tabOptions"}if(App.selectedTab==self.dataObj.id){if(App.staticUniverse){if(App.FeedReader.isOpen){App.FeedReader.close()}return false}if(App.tabEditing==self.elm.id){return }if(App.FeedReader.isOpen){App.FeedReader.close();return }if(action!="tabOptions"){self.rename()}else{self.showTabOptions()}}else{if(App.tabEditing!=-1){var v=$(App.tabEditing);if(v&&v.firstChild&&v.firstChild.firstChild&&v.firstChild.firstChild.onblur){v.firstChild.firstChild.onblur(v.firstChild.firstChild)}}self.switchTo()}}
	function build(){
		var container=$("divTabs");var ul=container.firstChild;if(typeof self.dataObj.cols=="undefined"||self.dataObj.cols==0){self.dataObj.cols=App.userCustom.numCol||3}var li=$("tab"+self.dataObj.id);if(li){self.icon=li.getElement("img.icon")}else{var li=document.createElement("li");li.id="tab"+self.dataObj.id;s=self.dataObj.icon;s=s.replace(/^http:\/\/.*\.?netvibes\.(com|local)\/img\/icon/,App.getStaticUrl("/img/icon"));if(s.trim()==""){s=App.getStaticUrl(NV_PATH+"img/s.gif")}self.icon.src=s;self.setTitle(li);ul.appendChild(li)}li.onclick=function(e){e=new Event(e);if(e.target.className=="tabName"){tabOnClick("rename")}else{if(e.target.className=="unread"){var myId=e.target.parentNode.parentNode.id.substr(3);if(App.selectedTab!=myId||e.target.innerHTML==""){tabOnClick("tabOptions");return true}if(!confirm(_("Really mark all rss items on this tab as read?"))){return false}var ln=App.moduleList.length;for(var z=0;z<ln;z++){var m=App.moduleList[z];if(m.dataObj.tab!=myId){continue}if(m.content&&typeof m.content.setAllAsReadOnMouseDown=="function"){m.content.setAllAsReadOnMouseDown()}}App.selectedTabObj.setTitle();m=null;if(App.FeedReader.isOpen){App.FeedReader.readAll()}}else{tabOnClick("tabOptions")}}};if(!App.staticUniverse){App.Drag.init(li,li);li.onDragStart=function(x,y,mousex,mousey){var posX=findPosX(this);var posY=findPosY(this);this.style.left=posX+"px";this.style.top=posY+"px";this.setAttribute("posx",posX);this.setAttribute("posy",posY);tabGhost.style.display="none";tabGhost.firstChild.style.height=8+"px";$("divTabs").firstChild.insertBefore(tabGhost,this);var ln=App.tabList.length;if(App.staticUniverse){var maxWidth=this.offsetWidth}else{var maxWidth=-1,w;for(var z=0;z<ln;z++){w=App.tabList[z].elm.offsetWidth;if(maxWidth<w){maxWidth=w}if(App.tabList[z].elm==this){App.tabList[z].elm.setAttribute("pos",z)}}}tabGhost.firstChild.style.width=maxWidth+"px";self.hasBeenDragged=false;var l=App.tabList[App.tabList.length-1].elm;App.tabBottom=findPosY(l)+l.offsetHeight;l=App.tabList[0].elm;App.tabTop=findPosY(l);App.dropBoxDrag=null};li.onDrag=function(x,y,mousex,mousey){var t=parseInt(this.style.top,10);var l=parseInt(this.style.left,10);if(this.style.position!="absolute"&&(Math.abs(t-this.getAttribute("posy"))>10||Math.abs(l-this.getAttribute("posx"))>10)){this.style.position="absolute";self.hasBeenDragged=true;App.draggingItem=true;tabGhost.style.display="inline"}if(this.style.position=="absolute"){l=Math.max(0,l);if(!App.staticUniverse){var tabs=$("divTabs").getElementsByTagName("li");var hy=0;for(var z=0;z<tabs.length;z++){if(tabs[z]==this){continue}x=findPosX(tabs[z]);y=findPosY(tabs[z]);hy=y+tabs[z].offsetHeight;if(y<=App.tabTop){y-=200}else{if(hy>=App.tabBottom){hy+=200}}if(x<=mousex&&mousex<=x+tabs[z].offsetWidth&&y<=mousey&&mousey<=hy){if(tabGhost==tabs[z]){break}if(typeof tabs[z]=="undefined"){break}Element.remove(tabGhost);if(typeof tabs[z]=="undefined"){$("divTabs").firstChild.appendChild(tabGhost)}else{$("divTabs").firstChild.insertBefore(tabGhost,tabs[z])}tabGhost.setAttribute("pos",z);break}}}}};li.onDragEnd=function(x,y,mousex,mousey){this.style.position="static";this.style.top="";this.style.left="";Element.removeClassName(this,"transparent");if(self.hasBeenDragged){App.draggingItem=false;Element.remove(this);$("divTabs").firstChild.insertBefore(this,tabGhost);var li=$("divTabs").firstChild.firstChild;var oldTabList=App.tabList.slice();App.tabList=[];var i=0;do{var ln=oldTabList.length;for(var z=0;z<ln;z++){if(oldTabList[z].elm==li){oldTabList[z].sort=i++;App.tabList[App.tabList.length]=oldTabList[z];oldTabList.splice(z,1);break}}}while(li=li.nextSibling);App.saveUserData("taborder")}Element.remove(tabGhost)}}self.elm=li;self.selectionMark()}
	this.unload=function(){delete this.icon;delete this.unRead;delete self;self=null};
	build()
};
var NewPageTab=function(B){
	var B=$merge({title:undefined,i:undefined,defaultDataObj:null,switchTo:true},B);
	if(typeof B.i=="undefined"){B.i=-Math.floor(Math.random()*20+2)}
	var A={
		id:B.i,
		title:B.title||_("New Tab")+" "+App.tabList.length,
		sort:App.tabList.length,
		unread:0,
		icon:"",
		cols:App.userCustom.numCol,
		columnSizes:[],
		access:"private"
	};
	for(var C in B.defaultDataObj){A[C]=B.defaultDataObj[C]}
	var D=new PageTab(A);
	App.tabList.push(D);
	if(B.switchTo){D.switchTo()}
	if(typeof B.title=="undefined"){D.rename()}
	return D
};
App.Tabs={};
App.Tabs.createNewTab=function(E,B){
	var A={id:-Math.floor(Math.random()*20+2),title:E||_("New Tab")+" "+App.tabList.length,sort:App.tabList.length,unread:0,icon:"",cols:App.userCustom.numCol,columnSizes:[],access:"private"};for(var C in B){A[C]=B[C]}var D=new PageTab(A);App.tabList.push(D);if(typeof E=="undefined"){D.rename()}App.saveUserData("newtab",D.dataObj);return D};
App.Tabs.createLostTab=function(B){
	var A={id:-1,title:_("Lost & found"),sort:999,unread:0,icon:"/img/icons/zoom.gif",cols:App.userCustom.numCol,access:"private"};var C=new PageTab(A);App.tabList.push(C)};;

//19
if(top.location!=location&&Cookie.get("premiumUniverse")&&!App.noResize){
	var premiumUniverse=Cookie.get("premiumUniverse");if(premiumUniverse=="lefigaro"){var universeHost="http://www.lefigaro.fr/monfigaro/"}else{if(premiumUniverse=="lesechos"){var universeHost="http://www.mesechos.fr/"}else{if(premiumUniverse=="thestartingline"){var universeHost="http://remix.startinglinerock.com/"}else{if(premiumUniverse=="tagged"){var universeHost="http://start.tagged.com/"}else{if(premiumUniverse=="campusb"){var universeHost="http://www.campusb.fr/"}else{if(premiumUniverse=="sport24"){var universeHost="http://www.sport24.com/tabs/flux/"}else{if(premiumUniverse=="ilsole24ore"){var universeHost="http://www.my24.ilsole24ore.com/"}else{if(premiumUniverse=="airtraffic"){var universeHost="http://www.air-traffic.co.uk/"}else{if(premiumUniverse=="captaintheband"){var universeHost="http://www.captaintheband.com/"}else{if(premiumUniverse=="vortex"){var universeHost="http://www.vortexme.com/vortex/"}else{if(premiumUniverse=="vmn"){var universeHost="http://www.vmn.net/"}else{if(premiumUniverse=="unab"){var universeHost="http://escritorio.unab.cl/"}else{if(premiumUniverse=="my_msf"){var universeHost="http://www.msf.fr/"}else{if(premiumUniverse=="vmnfr"){var universeHost="http://www.vmn.net/"}else{if(premiumUniverse=="cofidis"){var universeHost="http://www.cofidis.fr/commun/contenu/file/bibliosite/netvibes/"}}}}}}}}}}}}}}}function iframeResize(){try{var A=document.body.offsetHeight;if(A<700){A=700}if($("nv-settings")&&$("nv-settings").offsetHeight>A){A=$("nv-settings").offsetHeight+150}if($("startMsg")&&$("startMsg").offsetHeight>A){A=$("startMsg").offsetHeight+300}if($("feedReader")&&parseInt($("feedReader").offsetHeight)>0){return }if(App.height&&App.height==A){return }App.height=A;document.getElementById("commFrame").src=universeHost+"resize.html?height="+A+"&rnd="+Math.random()*100000}catch(B){}}setInterval(function(){if(document.body){iframeResize()}},1000)};;

//20
if(typeof Netvibes=="undefined"||!Netvibes){var Netvibes={}}
if(typeof Netvibes.UI=="undefined"||!Netvibes.UI){
	Netvibes.UI={}}
Netvibes.UI.TabView=Class.create();
Netvibes.UI.TabView.prototype={
	setOptions:function(A){this.options={autohideDropdowns:true,classTabSet:"nv-tabSet",classTabList:"nv-tabList",classTabContent:"nv-tabContent",softPadding:false,orientation:"top",dataKey:"text",extendedAction:false,allowReload:false};Object.extend(this.options,A||{})},initialize:function(A){this.setOptions(A);this.dataItems={};this.selectedTab=null;this.selectedIndex=this.options.selectedIndex||0},_createTabSet:function(){this.tabSet=document.createElement("div");this.tabSet.className=this.options.classTabSet;this.tabList=document.createElement("ul");this.tabList.className=this.options.classTabList+" autoclear";this.tabList.style.padding="0";if(/^(top|bottom|left|right)$/.test(this.options.orientation)){Element.addClassName(this.tabList,this.options.orientation)}this.tabSet.appendChild(this.tabList)},appendTo:function(A){if(!this.tabSet){this._createTabSet()}if(!this.selectedTab&&this.tabList.hasChildNodes()){this.selectTab(0,false)}$(A).appendChild(this.tabSet);if(typeof widget=="object"&&typeof widget.callback=="function"){widget.callback("onUpdateBody")}},addTab:function(B,A,L){if(!this.tabSet){this._createTabSet()}if(typeof L=="undefined"){L={}}var K=document.createElement("li");K.className="tab "+B;K.setAttribute("name",B);if(A.disabled){Element.addClassName(K,"disabled")}else{K.onclick=this.eventTabClicked.bindAsEventListener(this);if(L.staticText){K.setAttribute("static","static")}}var H=document.createElement("a");H.href="javascript:void(0)";H.title="";H.target="_blank";H.style.whiteSpace="nowrap";H.onclick=function(){return false};if(A.length){if(A[0].image){var J=document.createElement("img");J.src=A[0].image;H.appendChild(J)}else{if(A[0].picto){var D=document.createElement("img");D.src=A[0].picto;D.style.marginRight="4px";D.style.marginBottom="-2px";H.appendChild(D)}else{if(A[0].icon){var G=document.createElement("img");G.src=A[0].icon;G.style.marginRight="4px";G.style.marginBottom="-2px";H.appendChild(G)}}var C=document.createElement("span");C.appendChild(document.createTextNode(L.staticText||A[0].text));H.appendChild(C)}K.setAttribute("key",A[0][this.options.dataKey]);var E=document.createElement("span");E.className="dropdown";do{var F="dropdownTab-"+(++Netvibes.UI._idIncrement)}while($(F));E.setAttribute("id",F);var I=document.createElement("img");I.src="http://"+NV_HOST+"/img/s.gif";I.width=14;I.height=14;I.style.verticalAlign="middle";I.className="placeHolder";E.appendChild(I);H.appendChild(E);E.onmousedown=this.eventDropDown.bindAsEventListener(this)}else{if(A.image){var J=document.createElement("img");J.src=A.image;H.appendChild(J)}else{if(A.picto){var D=document.createElement("img");D.src=A.picto;D.style.marginRight="4px";D.style.marginBottom="-2px";H.appendChild(D)}else{if(A.icon){var G=document.createElement("img");G.src=A.icon;G.style.marginRight="4px";G.style.marginBottom="-2px";H.appendChild(G)}}if(typeof A.text=="string"){H.appendChild(document.createTextNode(A.text))}else{H.appendChild(A.text)}}}K.appendChild(H);if(this.selectedTab==null){}this.tabList.appendChild(K);this.createTabContent(B);this.dataItems[B]=A;return K},removeTab:function(A){var B=this.getTab(A);Element.remove(B)},addExternalLink:function(B,A){var C=this.getTab(B);C.firstChild.setAttribute("href",A)},eventTabClicked:function(B){if(Event.element(B).className=="placeHolder"){return false}var A=Event.findElement(B,"LI");if(!Element.hasClassName(A,"disabled")){this.selectTab(A)}return false},eventExtendedActionClicked:function(A){this.hidePopupMenu();this._notify("extendedActionClicked");return false},enableTab:function(B,A){var C=this.getTab(B);if(A){Element.removeClassName(C,"disabled")}else{Element.addClassName(C,"disabled")}},selectTab:function(E,I){if(typeof E=="number"||typeof E=="string"){E=this.getTab(E)}var A=E.getAttribute("name");if(this.selectedTab&&(this.selectedTab.getAttribute("name")==A)&&I==undefined&&!this.options.allowReload){return }var G=this.tabList.getElementsByTagName("li");for(var D=0,H;H=G[D];D++){Element.removeClassName(H,"selected");if(this.popupMenu){this.hidePopupMenu()}if(this.options.autohideDropdowns){var C=$(H).getElementsByClassName("dropdown");$A(C).each(function(J){Element.hide(J)})}}Element.addClassName(E,"selected");if(this.options.autohideDropdowns){var C=$(E).getElementsByClassName("dropdown");$A(C).each(function(J){Element.show(J)})}for(var D=0,F;F=this.contentArray[D];D++){if(Browser.isSafari&&Browser.version<3&&F.getElementsByTagName("iframe").length==1&&F.getElementsByTagName("iframe")[0].style.width=="100%"){if(A==F.getAttribute("name")){F.style.visibility="visible";F.style.position="static"}else{var B=F.getElementsByTagName("iframe")[0];F.style.width=B.contentWindow.innerWidth+"px";F.style.visibility="hidden";F.style.position="absolute";F.style.left="0px";F.style.top="0px"}}else{if(A==F.getAttribute("name")){Element.show(F)}else{Element.hide(F)}}}this.selectedTab=E;this.selectedIndex=E.getAttribute("index");if(I===false){return }this._notify("activeTabChange")},hide:function(){Element.hide(this.tabSet)},show:function(){Element.show(this.tabSet)},hideTabList:function(){Element.hide(this.tabList)},showTabList:function(){Element.show(this.tabList)},reload:function(){this._notify("activeTabChange")},eventDropDown:function(B){var A=Event.findElement(B,"LI");this.popupMenu=$("minitabsOptions");if(!this.popupMenu){this.popupMenu=document.createElement("ul");this.popupMenu.setAttribute("id","minitabsOptions");this.popupMenu.className="popupMenu";this.popupMenu.style.position="absolute";document.getElementsByTagName("body").item(0).appendChild(this.popupMenu);Element.hide(this.popupMenu);Event.observe(document,"mousedown",this.hidePopupMenu.bindAsEventListener(this))}var C=$(A).getElementsByClassName("dropdown")[0];if(Element.visible(this.popupMenu)&&this.popupMenu.getAttribute("dropdownId")==C.id){this.hidePopupMenu();return }this._showPopupMenu(A);this.popupMenu.setAttribute("dropdownId",C.id);Event.stop(B);return false},getTabContent:function(A){if(typeof A=="number"){return this.contentArray.detect(function(B){return B.getAttribute("index")==A})}return this.contentArray.detect(function(B){return B.getAttribute("name")==A})},setContent:function(A,C){var B=this.getTabContent(A);if(B){if(typeof C=="string"){B.innerHTML=C}else{B.innerHTML="";B.appendChild(C)}}if(typeof widget=="object"&&typeof widget.callback=="function"){widget.callback("onUpdateBody")}},getTab:function(B){if(typeof B=="string"||typeof B=="number"){var A=this.tabList.getElementsByTagName("li");for(var C=0,D;D=A[C];C++){if(typeof B=="number"&&B==C){return D}if(B==D.getAttribute("name")){return D}}}return B},observe:function(B,A){if(!this.observers){this.observers=[]}this.observers.push([B,A])},_notify:function(C){if(!this.observers){return }var B=this.selectedTab;var A=this.dataItems[B.getAttribute("name")];if(A.length){var D=this.options.dataKey;A=A.detect(function(E){return E[D]==B.getAttribute("key")})}this.observers.each(function(E){if(E[0]==C&&typeof (E[1])=="function"){E[1](B.getAttribute("name"),A)}})},_showPopupMenu:function(R){var D=Position.cumulativeOffset(R);this.popupMenu.innerHTML="";try{var A=R.getAttribute("name");var C=this.dataItems[A];var T=R.getAttribute("key");for(var M=0,P;P=C[M];M++){if(P[this.options.dataKey]==T&&R.getAttribute("static")!="static"){continue}var H=document.createElement("li");var S=document.createElement("a");if(P.picto){var I=document.createElement("img");I.src=P.picto;I.style.marginRight="4px";I.style.marginBottom="-2px";S.appendChild(I)}else{if(P.icon){var N=document.createElement("img");N.src=P.icon;N.style.marginRight="4px";N.style.marginBottom="-2px";S.appendChild(N)}}S.href=(P.htmlUrl||"javascript:void(0)");S.setAttribute("context",A);S.appendChild(document.createTextNode(P.text));S.setAttribute("key",P[this.options.dataKey]);if(!this.options.extendedAction&&(C.length-1)==M){Element.addClassName(S,"last")}S.onclick=this.eventPopupMenuClicked.bindAsEventListener(this);H.appendChild(S);this.popupMenu.appendChild(H)}if(this.options.extendedAction){var H=document.createElement("li");var S=document.createElement("a");S.href="javascript:void(0)";Element.addClassName(S,"action");S.setAttribute("context",A);S.appendChild(document.createTextNode(this.options.extendedAction));S.onclick=this.eventExtendedActionClicked.bindAsEventListener(this);H.appendChild(S);this.popupMenu.appendChild(H)}}catch(O){}var F=Element.getDimensions(R);var Q=(typeof App!="undefined"&&App.userCustom&&(App.userCustom.themeTitle=="Coriander"))?0:1;if(Browser.isSafari||Browser.isOpera){Q=0}this.popupMenu.style.left=(D[0]+Q)+"px";this.popupMenu.style.top=(D[1]+Q+F.height)+"px";this.popupMenu.style.width="auto";var B=Element.getDimensions(this.popupMenu).width;if(B<F.width){var Q=12;if(Browser.isIE){Q=11}this.popupMenu.style.width=F.width-Q+"px"}Element.show(this.popupMenu);var L=$(this.tabList).getElementsByClassName("dropped");$A(L).each(function(U){Element.removeClassName(U,"dropped")});Element.addClassName(R,"dropped");if(typeof widget=="object"&&typeof widget.callback=="function"){var P;var K;P=widget.body;var E=0;while(P&&P!=document.body){E+=P.offsetTop;P=P.offsetParent}P=this.popupMenu;var J=0;while(P&&P!=document.body){J+=P.offsetTop;P=P.offsetParent}popupDim=Element.getDimensions(this.popupMenu);bodyDim=widget.body.getDimensions();var G=J-E+popupDim.height;if(bodyDim.height<G){widget.body.style.height=G+"px"}widget.callback("onUpdateBody")}},eventPopupMenuClicked:function(D){var B=Event.findElement(D,"A");var C=B.getAttribute("context");var F=this.getTab(C);if(F.getAttribute("static")!="static"){var E=this.options.dataKey;var A=this.dataItems[C].detect(function(G){return G[E]==B.getAttribute("key")});F.getElementsByTagName("span")[0].innerHTML=A.text;if(A.picto){F.getElementsByTagName("img")[0].src=A.picto}else{if(A.icon){F.getElementsByTagName("img")[0].src=A.icon}}}F.setAttribute("key",B.getAttribute("key"));this._notify("activeTabChange");this.selectTab(F);this.hidePopupMenu();Event.stop(D);return false},selectKey:function(C,D,A){var F=this.getTab(C);var B=null;var E=this.options.dataKey;if(typeof (this.dataItems[C].detect)=="function"){B=this.dataItems[C].detect(function(G){return G[E]==D})}if(B){F.getElementsByTagName("span")[0].innerHTML=B.text;F.setAttribute("key",D);if(B.icon){F.getElementsByTagName("img")[0].src=B.icon}if(A==undefined||A){this.selectTab(F)}if(A==undefined||A){this.selectTab(F)}}},hidePopupMenu:function(A){if(!this.popupMenu){return false}if(A&&Position.within(this.popupMenu,Event.pointerX(A),Event.pointerY(A))){Event.stop(A);return false}Element.hide(this.popupMenu);var B=$(this.tabList).getElementsByClassName("dropped");$A(B).each(function(C){Element.removeClassName(C,"dropped")});if(typeof widget=="object"&&typeof widget.callback=="function"){widget.body.style.height="";widget.callback("onUpdateBody")}},createTabContent:function(B,A){var C=document.createElement("div");if(this.options.softPadding){if(Browser.isIE){C.style.padding="3px 3px 3px 3px"}else{C.style.padding="6px 3px 3px 3px"}}C.className=this.options.classTabContent+" "+B;C.setAttribute("name",B);C.innerHTML=_("Loading...");this.tabSet.appendChild(C);if(!this.contentArray){this.contentArray=[]}this.contentArray.push(C);C.setAttribute("tabIndex",this.contentArray.length-1)},restoreState:function(A){var C=A.dataObj.data;if(typeof C.miniTabViewState!="undefined"){var B=C.miniTabViewState.parseJSON();if(B&&typeof B.selectedKey=="string"){this.selectKey(B.selectedKey);return }if(B&&typeof B.selectedTab=="string"){this.selectTab(B.selectedTab);return }}this.selectTab(0)},saveState:function(C){var B=null;var A=this.selectedTab.getAttribute("key");if(typeof A=="string"){B='{"selectedKey": "'+A+'"}'}else{B='{"selectedTab": "'+this.selectedTab.getAttribute("name")+'"}'}if(B&&B!=C.dataObj.data.miniTabViewState){C.dataObj.data.miniTabViewState=B;C.save()}},destroy:function(){Event.stopObserving(document,"mousedown",this.hidePopupMenu)}};

var MiniTabs={};MiniTabs.create=function(C,A){var B=new Netvibes.UI.TabView(A);B.appendTo(C);return B};;

//21
Netvibes.UI.ColorPicker=Class.create();
Netvibes.UI.ColorPicker.prototype={
	setOptions:function(A){this.options={color:null,onSelectionChange:Function.empty};Object.extend(this.options,A||{});if(typeof this.options.color=="string"&&this.options.color.indexOf("#")==0){this.options.color=[hex2dec(this.options.color.substr(1,2)),hex2dec(this.options.color.substr(3,2)),hex2dec(this.options.color.substr(5,2))]}},initialize:function(A){this.setOptions(A);this.colorPicker=document.createElement("div");this.colorPicker.id="nv-colorPicker";this.colorPicker.style.border="2px solid #444";this.colorPicker.style.backgroundColor="white";this.colorPicker.style.position="absolute";this.colorPicker.style.padding="6px";this.colorPicker.style.zIndex="10000";document.body.appendChild(this.colorPicker);Event.observe(document,"click",this.hide.bindAsEventListener(this),!Browser.isIE)},ToRGB1:function(C,B,A){if(A>360){A-=360}else{if(A<0){A+=360}}if(A<60){C=C+(B-C)*A/60}else{if(A<180){C=B}else{if(A<240){C=C+(B-C)*(240-A)/60}}}return Math.round(C*255)},HSLtoRGB:function(C,B,A){var D,E;if(B==0){return[A,A,A]}C=C*360/255;B/=255;A/=255;if(A<=0.5){D=A+A*B}else{D=A+B-A*B}E=2*A-D;return[this.ToRGB1(E,D,C+120),this.ToRGB1(E,D,C),this.ToRGB1(E,D,C-120)]},cssColorToRGB:function(B){var A;if(B.indexOf("#")==0){B=B.toUpperCase();return[this.hex2dec(B.substr(1,2)),this.hex2dec(B.substr(3,2)),this.hex2dec(B.substr(5,2))]}else{if(B.indexOf("rgb")==0){A=(B.substr(4,B.indexOf(")")-4)).split(",");return A}}},hex2dec:function(B){var C="0123456789ABCDEF";var A=0;for(a=B.length-1;a>=0;a--){A+=Math.pow(16,B.length-a-1)*C.indexOf(B.charAt(a))}return A},dec2hex:function(C){var B="0123456789ABCDEF";var A=B.substr(C&15,1);while(C>15){C>>=4;A=B.substr(C&15,1)+A}if(A.length==1){A="0"+A}return A},build:function(){var C=document.createElement("table");C.style.borderCollapse="collapse";C.style.cursor="pointer";C.style.clear="both";var B=document.createElement("tbody");for(l=0;l<=250;l+=10){if(l==250){l=255}var D=document.createElement("tr");var F=document.createElement("td");F.style.height="10px";F.style.width="10px";F.style.backgroundColor="rgb("+l+","+l+","+l+")";if(this.options.color&&this.options.color[0]==l&&this.options.color[1]==l&&this.options.color[2]==l){if(l>130){F.style.color="black"}else{F.style.color="white"}F.style.textAlign="center";if(Browser.isIE){F.innerHTML="<div style='position: absolute; margin-top: -4px;margin-left:-2px'>x</div>"}else{F.innerHTML="<div style='position: absolute; margin-top: -9px;margin-left:2px'>x</div>"}var E=F.firstChild;this.current=false}D.appendChild(F);F.onclick=this.onColorPicked.bindAsEventListener(this);for(t=0;t<=240;t+=10){F=document.createElement("td");var A=this.HSLtoRGB(t,240,l);F.style.height="10px";F.style.width="10px";if(this.current&&this.options.color[0]==A[0]&&this.options.color[1]==A[1]&&this.options.color[2]==A[2]){F.style.color="rgb("+(255-A[0])+","+(255-A[1])+","+(255-A[2])+")";F.style.textAlign="center";if(Browser.isIE){F.innerHTML="<div style='position: absolute; margin-top: -4px;margin-left:-2px'>x</div>"}else{F.innerHTML="<div style='position: absolute; margin-top: -9px;margin-left:2px'>x</div>"}var E=F.firstChild;this.current=false}F.style.backgroundColor="rgb("+A[0]+","+A[1]+","+A[2]+")";F.onclick=this.onColorPicked.bindAsEventListener(this);D.appendChild(F)}B.appendChild(D)}C.appendChild(B);return C},onColorPicked:function(B){var C=Event.findElement(B,"TD");var A=this.cssColorToRGB(C.style.backgroundColor);A=this.dec2hex(A[0])+this.dec2hex(A[1])+this.dec2hex(A[2]);this.options.onSelectionChange(A);Element.hide(this.colorPicker);Event.stop(B)},show:function(B){this.element=B;this.colorPicker.innerHTML="";this.colorPicker.appendChild(this.build());if(this.options.top===undefined){var C=Position.cumulativeOffset(B);var A=Element.getDimensions(B);this.colorPicker.style.left=C[0]+"px";this.colorPicker.style.top=(C[1]+A.height+20)+"px"}else{this.colorPicker.style.left=this.options.left+"px";this.colorPicker.style.top=this.options.top+"px"}Element.show(this.colorPicker)},hide:function(A){if(!Position.within(this.colorPicker,Event.pointerX(A),Event.pointerY(A))&&!Position.within(this.element,Event.pointerX(A),Event.pointerY(A))){Element.hide(this.colorPicker)}}};
window._colorPicker=null;
Netvibes.UI.showColorPicker=function(B,A){
	if(window._colorPicker==null){window._colorPicker=new Netvibes.UI.ColorPicker(A)}window._colorPicker.setOptions(A);if(Browser.isIE){Event.stop(window.event)}window._colorPicker.show(B)};;

//22
Netvibes.UI.FlashPlayer=Class.create();
Netvibes.UI.FlashPlayer._maxzIndex=9010;
Netvibes.UI.FlashPlayer.prototype={
	setOptions:function(A){this.options={flashVars:"",flashUrl:"",width:320,height:240,wmode:"opaque",showToolbar:true,showFullScreenLink:true,fixModuleId:0};Object.extend(this.options,A||{})},initialize:function(B,A){this.setOptions(A);this.parent=B;this.container=null;this.linuxIframe=null;this.isFullScreen=false},show:function(D,C,A){if(typeof A=="undefined"){A={}}this.options.flashUrl=D;if(Browser.isIE){if(this.options.flashUrl.indexOf("?")!=-1){this.options.flashUrl+="&"}else{this.options.flashUrl+="?"}this.options.flashUrl+=Math.round(Math.random()*100)}this.options.flashVars=C;if(!this.container){this.container=document.createElement("div");this.container.className="flashplayer";this.container.align="center";this.container.style.position="absolute";this.container.style.zIndex="8000";this.container.style.background="#ffffff";this.parent.appendChild(this.container);if(!Browser.isIE){this.container.style.position="absolute";this.placeHolder=document.createElement("div");this.placeHolder.style.height=this.options.height+"px";this.parent.appendChild(this.placeHolder)}}else{this.container.innerHTML=""}var B="";B+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+this.options.width+'" height="'+this.options.height+'">';B+='<param name="allowScriptAccess" value="sameDomain" />';B+='<param name="movie" value="'+this.options.flashUrl+'" />';B+='<param name="quality" value="high" />';B+='<param name="wmode" value="'+this.options.wmode+'" />';B+='<param name="bgcolor" value="#ffffff" />';B+='<param value="true" name="allowfullscreen"/>';B+='<param name="flashVars" value="'+this.options.flashVars+'" />';B+='<embed wmode="'+this.options.wmode+'" src="'+this.options.flashUrl+'" quality="high" bgcolor="#ffffff" width="'+this.options.width+'" height="'+this.options.height+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashVars="'+this.options.flashVars+'" allowfullscreen="true"/>';B+="</object>";this.container.innerHTML=B;this.element=this.parent.getElementsByTagName((Browser.isIE||Browser.isSafari)?"object":"embed")[0];if(this.options.showToolbar){this._createLinks(A.mediaLinkUrl,A.mediaLinkText)}Element.show(this.container);if(this.placeHolder){Element.show(this.placeHolder)}this.resize()},hide:function(){if(this.container){this.container.innerHTML="";Element.hide(this.container);if(this.placeHolder){Element.hide(this.placeHolder)}}if(this.hide&&this.links){Element.hide(this.links)}if(typeof widget=="object"&&typeof widget.callback=="function"){widget.callback("onUpdateBody")}return false},setFullScreenMode:function(A){this.isFullScreen=(typeof (A)!="undefined"&&A)?true:false;this._fixAdjacentModules();if(this.isFullScreen){window.scrollTo(0,0);if(Browser.isIE){this.container.style.position="absolute"}this.container.style.top="0px";this.container.style.left="0px";this.container.style.marginLeft="0";this.container.style.zIndex=++Netvibes.UI.FlashPlayer._maxzIndex;this._createCloseButton();Event.observe(window,"resize",this.resize.bindAsEventListener(this))}else{Element.remove(this.closeButton);if(Browser.isLinux&&Browser.isFirefox){Element.remove(this.linuxIframe)}Event.stopObserving(window,"resize",this.resize)}this.resize();if(Browser.isLinux&&Browser.isFirefox){this.linuxIframe=document.createElement("iframe");this.linuxIframe.style.position="absolute";this.linuxIframe.style.width=this.closeButton.offsetWidth+"px";this.linuxIframe.style.height=this.closeButton.offsetHeight+"px";this.linuxIframe.style.left=this.closeButton.offsetLeft+"px";this.linuxIframe.style.top=this.closeButton.offsetTop+"px";this.linuxIframe.setAttribute("frameborder","0");this.linuxIframe.setAttribute("scrolling","no");this.linuxIframe.style.zIndex=parseInt(this.container.style.zIndex)+1;document.body.appendChild(this.linuxIframe)}return false},resize:function(A,C){if(!this.container){return }if(this.isFullScreen){if(this.container.style.width!=Browser.getDocumentWidth()){this.container.style.width="1px";this.container.style.height="1px";this.element.style.width="1px";this.container.style.width=Browser.getDocumentWidth()+"px";this.container.style.height=Browser.getDocumentHeight()+"px";this.element.style.height=Browser.getClientHeight()-(Browser.isFirefox?3:0)+"px";this.element.style.width=Browser.getDocumentWidth()+"px"}return }this.container.style.top="";this.container.style.left="";this.container.style.width="1px";this.container.style.height="1px";if(typeof A!="undefined"&&typeof C!="undefined"){this.container.style.width=A+"px";if(!Browser.isIE){this.placeHolder.style.height=C+"px";this.container.style.marginLeft="0px"}this.container.style.height=C+"px";this.element.style.width=A+"px";this.element.style.height=C+"px";return }if(Browser.isIE){this.container.style.position="";var D=Element.getDimensions(this.parent);this.container.style.width=D.width+"px";this.container.style.height=this.options.height+"px";this.element.style.width=this.options.width+"px";this.element.style.height=this.options.height+"px"}else{var D=Element.getDimensions(this.placeHolder);var B=Math.min(this.options.width,D.width);this.container.style.width=B+"px";this.container.style.height=D.height+"px";this.element.style.width=B+"px";this.element.style.height=D.height+"px";this.container.style.marginLeft=Math.round((D.width-B)/2)+"px"}},_createCloseButton:function(){this.closeButton=document.createElement("input");this.closeButton.type="button";this.closeButton.id="flashplayer-back";this.closeButton.style.position="absolute";this.closeButton.style.top="2px";this.closeButton.style.right="2px";this.closeButton.value=_("Back to my page");this.closeButton.style.zIndex=parseInt(this.container.style.zIndex)+2;if(Browser.isIE&&Browser.version>6){this.closeButton.style.width=(this.closeButton.value.length)+"em"}this.closeButton.onclick=function(){this.setFullScreenMode(false)}.bind(this);document.body.appendChild(this.closeButton)},_createLinks:function(A,C){if(this.links){Element.remove(this.links)}this.links=document.createElement("p");this.links.align="center";this.links.style.padding="4px";if(A&&C){var B=document.createElement("a");B.href=A;B.rel="external";B.target="_blank";B.innerHTML=C.stripTags();this.links.appendChild(B)}this.links.appendChild(document.createTextNode(" | "));var D=document.createElement("a");D.href="javascript:void(0)";D.onclick=this.hide.bind(this);D.innerHTML=_("Hide");this.links.appendChild(D);this.parent.appendChild(this.links)},_fixAdjacentModules:function(){if(!this.options.fixModuleId){return }var A=$("application").getElementsByClassName("gripper");for(var D=0;D<A.length;D++){var B=A[D];if(this.isFullScreen){B.style.visibility="hidden"}else{B.style.visibility=""}}for(var D=0,C;C=App.moduleList[D];D++){if(C.dataObj.tab==App.selectedTab&&C.dataObj.fixId!=this.options.fixModuleId){if(this.isFullScreen){C.hide()}else{C.show()}}}}};;


//23
if(typeof App=="undefined"){var App={}}
App.toolTip=function(A,B,I,D,H){
	if(App&&App.draggingItem){return true}var E=0;var J=20;var G=false;var F=$("tooltip");if(I==null){I=150}if(D==null){D="center"}if(App.dirRTL&&D=="left"){D="right"}function C(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}this.display=function(M,K,L,N){this.node=M;if(document.addEventListener){document.addEventListener("mousemove",this.positiontip.bind(this),false);M.addEventListener("mouseout",this.hide.bind(this),false)}else{document.attachEvent("onmousemove",this.positiontip.bind(this));M.attachEvent("onmouseout",this.hide.bind(this))}F.style.textAlign=N;F.innerHTML='<div class="tooltipFrame"><div class="tooltipFrame2">'+K+"</div></div>";F.style.display="block";if(F.offsetWidth>L){F.style.width=L+"px"}else{F.style.width=F.offsetWidth+"px"}G=true};this.positiontip=function(P){if(G){var L=Event.pointerX(P);var K=Event.pointerY(P);var N=Browser.isIE&&!window.opera?C().clientWidth-P.clientX-E:window.innerWidth-P.clientX-E-20;var M=Browser.isIE&&!window.opera?C().clientHeight-P.clientY-J:window.innerHeight-P.clientY-J-20;var R=(E<0)?E*(-1):-1000;if(F.offsetWidth>I){F.style.width=I+"px"}var O=parseInt(F.style.width);if(App.dirRTL){if(N<O){if(Browser.isIE){F.style.left=C().scrollLeft+P.clientX-O+"px"}else{F.style.left=L+E-O+"px"}}else{if(L<O+5){F.style.left="5px"}else{F.style.left=L+E-O+"px"}}}else{if(N<O){if(Browser.isIE){F.style.left=C().scrollLeft+P.clientX-O+"px"}else{F.style.left=L+E-O+"px"}}else{if(L<R){F.style.left="5px"}else{F.style.left=L+E+"px"}}}if(M<F.offsetHeight){var Q=(Browser.isSafari)?0:window.pageYOffset;F.style.top=(Browser.isIE)?C().scrollTop+P.clientY-F.offsetHeight-J+"px":Q+P.clientY-F.offsetHeight-J+"px"}else{F.style.top=K+J+"px"}F.style.visibility="visible"}};this.hide=function(){if(document.removeEventListener){document.removeEventListener("mousemove",this.positiontip,false);A.removeEventListener("mouseout",this.hide,false)}else{document.detachEvent("onmousemove",this.positiontip);A.detachEvent("onmouseout",this.hide)}if(App&&App.draggingItem){return true}document.onmousemove=null;G=false;F.style.visibility="hidden";F.style.top="-1000px";F.style.backgroundColor="";F.style.width=""};this.display(A,B,I,D)};;

//24
VideoPlayer=Class.create();
VideoPlayer.prototype={
	id:null,
	target:null,
	options:null,
	index:0,
	mediaContainer:null,
	controllerContainer:null,
	media:null,
	controller:null,
	listenerId:null,
	listener:null,
	mediaId:null,
	initialize:function(B,A){
		this.target=B;
		this.options=A;this.index=0;
		if(!this.options.width){this.options.width=200}
		if(!this.options.height){this.options.height=150}
		VideoManager.register(this);
		this.mediaId=this.id+"media";
		this.listenerId=this.id+"listener";
		this.listener=new Object();
		window[this.listenerId]=this.listener;
		var C=document.createElement("div");
		Element.addClassName(C,"videoplayer");
		this.mediaContainer=document.createElement("div");
		Element.addClassName(this.mediaContainer,"media");
		this.controllerContainer=document.createElement("div");
		Element.addClassName(this.controllerContainer,"controller");
		C.appendChild(this.mediaContainer);
		C.appendChild(this.controllerContainer);
		this.target.appendChild(C)
	},
	show:function(){
		var D=this.options.videos[this.index].type;
		var B=this.options.videos[this.index].url;
		var C=this.options.videos[this.index].width||this.options.width;
		var A=this.options.videos[this.index].height||this.options.height;
		this.media=VideoPlayerFactory.createMedia(this,D,B,C,A);
		this.controller=VideoPlayerFactory.createController(this,"netvibes");
		this.controller.show();this.media.show();this.controller.play()
	},
	hide:function(){Element.hide(this.target);this.index=0}};
VideoManager={
	list:new Array(),
	register:function(A){A.id=this._generateId();this.list.push(A)},
	_generateId:function(){return"videoplayer"+this.list.length}
};
VideoPlayerFactory={
	createMedia:function(B,C,D,A,E){
		switch(C){
			case"flv":return new FLVMedia(B,D,A,E);
			case"mov":return new QuicktimeMedia(B,D,A,E);
			case"wmv":return new WindowsMedia(B,D,A,E);
			case"rm":return new RealMedia(B,D,A,E)}
	},
	createController:function(A,B){
		switch(B){
			case"netvibes":return new NetvibesVideoController(A);break
		}
	}
};

AVideoMedia=Class.create();

AVideoMedia.prototype={
	id:null,url:null,width:null,height:null,_player:null,
	initialize:function(B,C,A,D){
		this._player=B;this.url=C;this.width=A;this.height=D;this.id=this._player.mediaId
	},
	show:function(){
		this._player.mediaContainer.innerHTML="No media"
	},
	hide:function(){this._player.mediaContainer.innerHTML=""},
	play:function(){},
	pause:function(){},
	stop:function(){},
	getDuration:function(){},
	getPosition:function(){},
	getBytesTotal:function(){},
	getBytesLoaded:function(){}
};
	
FLVMedia=Class.create();
Object.extend(FLVMedia.prototype,AVideoMedia.prototype);
Object.extend(
	FLVMedia.prototype,
	{
		duration:null,
		position:null,
		bytesTotal:null,
		bytesLoaded:null,
		show:function(){
			this._initializeListener();
			var A='<object id="'+this.id+'" type="application/x-shockwave-flash" data="/player/player_flv_js.swf" width="'+this.width+'" height="'+this.height+'"><param name="movie" value="/player/player_flv_js.swf" /><param name="AllowScriptAccess" value="always" /><param name="FlashVars" value="useexternalinterface=1&amp;useHandCursor=0&amp;bgcolor=000000&amp;listener='+this._player.listenerId+'" /><p>You need Flash</p></object>';
			this._player.mediaContainer.innerHTML=A
		},
		play:function(){
			$(this.id).SetVariable("method:play","")
		},
		pause:function(){
			$(this.id).SetVariable("method:pause","")
		},
		stop:function(){$(this.id).SetVariable("method:stop","")},
		getDuration:function(){return this.duration},
		getPosition:function(){return this.position},
		getBytesTotal:function(){return this.bytesTotal},
		getBytesLoaded:function(){return this.bytesLoaded},
		_initializeListener:function(){
			this._player.listener.media=this;
			this._player.listener.player=this._player;
			this._player.listener.onInit=function(){
				$(this.media.id).SetVariable("method:setUrl",this.media.url);
				$(this.media.id).SetVariable("method:play","")
			};
			this._player.listener.onClick=function(){};
			this._player.listener.onKeyUp=function(A){};
			this._player.listener.onFinished=function(){};
			this._player.listener.onUpdate=function(){
				this.media.duration=this.duration;
				this.media.position=this.position;
				this.media.bytesTotal=this.bytesTotal;
				this.media.bytesLoaded=this.bytesLoaded
			}
		}
	}
);

QuicktimeMedia=Class.create();

Object.extend(QuicktimeMedia.prototype,AVideoMedia.prototype);

Object.extend(QuicktimeMedia.prototype,{show:function(){var A='<object id="'+this.id+'" type="video/quicktime" data="'+this.url+'" width="'+this.width+'" height="'+this.height+'"><param name="src" value="'+this.url+'"/><param name="enableJavascript" value="true"/><param name="controller" value="false"/></object>';this._player.mediaContainer.innerHTML=A},play:function(){$(this.id).Play()},pause:function(){$(this.id).Stop()},stop:function(){$(this.id).Stop();$(this.id).Rewind()}});

WindowsMedia=Class.create();

Object.extend(WindowsMedia.prototype,AVideoMedia.prototype);
Object.extend(WindowsMedia.prototype,{show:function(){var A='<object id="'+this.id+'" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'+this.width+'" height="'+this.height+'"><param name="uiMode" value="none"/><param name="autoStart" value="true"/><param name="URL" value="'+this.url+'"/></object>';this._player.mediaContainer.innerHTML=A},play:function(){$(this.id).controls.play()},pause:function(){$(this.id).controls.pause()},stop:function(){$(this.id).controls.stop()}});

RealMedia=Class.create();

Object.extend(RealMedia.prototype,AVideoMedia.prototype);

Object.extend(RealMedia.prototype,{show:function(){var A='<object id="'+this.id+'" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="'+this.width+'" height="'+this.height+'"><param name="center" value="true"/><param name="autoStart" value="true"/><param name="controls" value="ImageWindow"/><param name="src" value="'+this.url+'"/></object>';this._player.mediaContainer.innerHTML=A},play:function(){$(this.id).DoPlay()},pause:function(){$(this.id).DoPause()},stop:function(){$(this.id).DoStop()}});

AVideoController=Class.create();

AVideoController.prototype={_player:null,initialize:function(A){this._player=A},show:function(){this._player.controllerContainer.innerHTML="No controller"},hide:function(){this._player.controllerContainer.innerHTML=""},play:function(){},pause:function(){},stop:function(){}};

EmptyVideoController=Class.create();

Object.extend(EmptyVideoController.prototype,AVideoController.prototype);

Object.extend(EmptyVideoController.prototype,{show:function(){this._player.controllerContainer.innerHTML=""}});

NetvibesVideoController=Class.create();

Object.extend(NetvibesVideoController.prototype,AVideoController.prototype);

Object.extend(
	NetvibesVideoController.prototype,
	{
		updateInterval:null,
		elapsedTime:true,
		show:function(){
			var A=document.createElement("div");
			Element.addClassName(A,"netvibesVideoController");
			var B=document.createElement("div");
			Element.addClassName(B,"buttonBar");
			A.appendChild(B);
			this.playButton=document.createElement("a");
			this.playButton.innerHTML="PLAY";
			Element.addClassName(this.playButton,"button");
			Element.addClassName(this.playButton,"play");
			Event.observe(this.playButton,"click",this._playRelease.bindAsEventListener(this));
			B.appendChild(this.playButton);
			this.pauseButton=document.createElement("a");
			this.pauseButton.innerHTML="PAUSE";
			Element.addClassName(this.pauseButton,"button");
			Element.addClassName(this.pauseButton,"pause");
			Event.observe(this.pauseButton,"click",this._pauseRelease.bindAsEventListener(this));
			B.appendChild(this.pauseButton);
			this.stopButton=document.createElement("a");
			this.stopButton.innerHTML="STOP";
			Element.addClassName(this.stopButton,"button");
			Element.addClassName(this.stopButton,"stop");
			Event.observe(this.stopButton,"click",this._stopRelease.bindAsEventListener(this));
			B.appendChild(this.stopButton);
			this.timeButton=document.createElement("a");
			this.timeButton.innerHTML="00:00";
			Element.addClassName(this.timeButton,"button");
			Element.addClassName(this.timeButton,"time");
			Event.observe(this.timeButton,"click",this._timeRelease.bindAsEventListener(this));
			B.appendChild(this.timeButton);
			this.timeline=document.createElement("div");
			Element.addClassName(this.timeline,"timeline");
			this.progressBar=document.createElement("div");
			Element.addClassName(this.progressBar,"progressBar");
			this.timeline.appendChild(this.progressBar);
			this.positionBar=document.createElement("div");
			Element.addClassName(this.positionBar,"positionBar");
			this.timeline.appendChild(this.positionBar);
			B.appendChild(this.timeline);
			var C=document.createElement("div");
			Element.addClassName(C,"footer");
			A.appendChild(C);
			this._player.controllerContainer.appendChild(A);
			this.updateInterval=setInterval(this._update.bind(this),500)},
		hide:function(){
			clearInterval(this.updateInterval);this._player.controllerContainer.innerHTML=""
		},
		play:function(){
			this._playRelease()
		},
		pause:function(){
			this._pauseRelease()
		},
		stop:function(){
			this._stopRelease()
		},
		_playRelease:function(A){
			this._player.media.play();
			Element.hide(this.playButton);
			Element.show(this.pauseButton)
		},
		_pauseRelease:function(A){
			this._player.media.pause();
			Element.hide(this.pauseButton);
			Element.show(this.playButton)
		},
		_stopRelease:function(A){
			this._player.media.stop();
			Element.hide(this.pauseButton);
			Element.show(this.playButton)
		},
		_timeRelease:function(A){this.elapsedTime=!this.elapsedTime},
		_update:function(){
			var A=this._player.media.getPosition();
			var G=this._player.media.getDuration();
			var E=this._player.media.getBytesTotal();
			var D=this._player.media.getBytesLoaded();
			var F=this.timeline.getStyle("width");
			F=Number(F.substr(0,F.length-2));
			if(A!=null&&G!=null){
				if(this.elapsedTime){
					var B=Math.floor(A/(1000*60));var C=Math.floor(A/1000)%60
				}else{
					var B=Math.floor((G-A)/(1000*60));
					var C=Math.floor((G-A)/1000)%60
				}
				this.timeButton.innerHTML=((this.elapsedTime)?"":"-")+((B<10)?"0"+B:B)+":"+((C<10)?"0"+C:C);
				this.positionBar.style.width=Math.round(F*A/G)+"px"}else{this.positionBar.style.width="0px"}
				if(E!=null&&D!=null){this.progressBar.style.width=Math.round(F*D/E)+"px"}else{this.progressBar.style.width="0px"}
		}
	}
);;

//25
var AudioPlayer=new Object();
AudioPlayer.onInit=function(){};
AudioPlayer._getControl=function(){if(Browser.isIE){}return document.getElementById("playermp3Control")};
AudioPlayer._createPlayer=function(){
	if(!$("playermp3Display")){
		var D=$$("#top span.create");
		if(D){D.setStyle("display","none")}
		var B=$("playermp3Container");
		var K=document.createElement("div");
		K.id="playermp3Display";
		var H=document.createElement("a");
		H.href="javascript:AudioPlayer.play()";
		H.innerHTML=Netvibes.UI.createIcon("actions-playermp3-play",_("Play"),16,16,true);
		K.appendChild(H);
		this.playButton=H;
		var L=document.createElement("a");
		L.href="javascript:AudioPlayer.pause()";
		L.innerHTML=Netvibes.UI.createIcon("actions-playermp3-pause",_("Pause"),16,16,true);
		K.appendChild(L);this.pauseButton=L;
		var O=document.createElement("a");
		O.href="javascript:AudioPlayer.stop()";
		O.innerHTML=Netvibes.UI.createIcon("actions-playermp3-stop",_("Stop"),16,16,true);
		K.appendChild(O);this.stopButton=O;
		var P=document.createElement("span");
		Element.addClassName(P,"playermp3-elapsedtime");
		Event.observe(P,"mousedown",this.timeClick.bindAsEventListener(this));
		P.innerHTML="00:00";K.appendChild(P);
		this.elapsedTime=P;
		var F=document.createElement("span");
		Element.addClassName(F,"playermp3-remainingtime");
		Event.observe(F,"mousedown",this.timeClick.bindAsEventListener(this));
		F.innerHTML="00:00";K.appendChild(F);this.remainingTime=F;
		var E=document.createElement("span");
		Element.addClassName(E,"playermp3-percentloaded");
		Event.observe(E,"mousedown",this.timeClick.bindAsEventListener(this));
		E.innerHTML="0%";K.appendChild(E);
		this.percentLoaded=E;
		var M=document.createElement("span");
		Event.observe(M,"mousedown",this.timelineClick.bindAsEventListener(this));
		Event.observe(M,"mouseover",this.timelineOver.bindAsEventListener(this));
		Element.addClassName(M,"playermp3-timeline");
		var I=document.createElement("span");
		Element.addClassName(I,"playermp3-timeline-elapsed");
		I.innerHTML="&nbsp;";M.appendChild(I);
		var G=document.createElement("span");
		Element.addClassName(G,"playermp3-timeline-title");
		M.appendChild(G);K.appendChild(M);
		this.timeline=M;this.timelineTitle=G;this.timelineElapsed=I;
		var A=document.createElement("span");
		Element.addClassName(A,"playermp3-volume");Event.observe(A,"mousedown",this.volumeDown.bindAsEventListener(this));
		Event.observe(document,"mousemove",this.volumeMove.bindAsEventListener(this));
		Event.observe(document,"mouseup",this.volumeUp.bindAsEventListener(this));
		var J=document.createElement("span");
		Element.addClassName(J,"playermp3-volume-indicator");
		A.appendChild(J);
		K.appendChild(A);
		this.volumeButton=A;
		this.volumeIndicator=J;
		var N=document.createElement("img");
		N.src="/img/s.gif";
		this.eq=N;
		Element.addClassName(this.eq,"playermp3-eq");
		K.appendChild(this.eq);
		var C=document.createElement("a");
		C.href="javascript:AudioPlayer.close()";
		C.innerHTML=Netvibes.UI.createIcon("actions-window-close",_("Close"),16,16,true);
		K.appendChild(C);this.closeButton=C;B.appendChild(K)
	}
};

AudioPlayer.onUpdate=function(){
	var E=this._getControl();
	var H=parseInt(this.position);
	var A=parseInt(this.duration);
	var K=Math.round(H/A*100);
	var B=A-H;var G=this.volume;
	if(this.volumeButton){
		var I=Element.getStyle(this.volumeButton,"width");I=parseInt(I.substr(0,I.length-2));var F=G/200*I;Element.setStyle(this.volumeIndicator,{width:F+"px"});var D=Math.floor(H/(1000*60));var J=Math.floor(H/1000)%60;this.elapsedTime.innerHTML=((D<10)?"0"+D:D)+":"+((J<10)?"0"+J:J);D=Math.floor(B/(1000*60));J=Math.floor(B/1000)%60;this.remainingTime.innerHTML="-"+((D<10)?"0"+D:D)+":"+((J<10)?"0"+J:J);this.percentLoaded.innerHTML=((this.bytesPercent=="NaN")?0:this.bytesPercent)+"%";if(this.bytesPercent=="100"&&Element.getStyle(this.percentLoaded,"display")=="block"){this.elapsedTime.style.display="block";this.remainingTime.style.display="none";this.percentLoaded.style.display="none"}this.timelineTitle.innerHTML=this.title;var L=Element.getStyle(this.timeline,"width");var C=parseInt(L.substr(0,L.length-2));C=C/this.bytesTotal*this.bytesLoaded;C=Math.round(C/100*K);if(!isNaN(C)){Element.setStyle(this.timelineElapsed,{width:C+"px"})}if(A>0&&H==A){this.stop();this.onUpdate()}
	}
};
AudioPlayer.play=function(A,B){
	if(App.FlashSupport.fv[0]<6){
		alert(_("You need to install Flash Player to use this feature.\n Go to http://www.adobe.com/go/getflashplayer"));
		return false
	}
	if(A){this.url=A;this.position=0}
	if(B){this.title=B.stripTags()}
	this._createPlayer();
	var C=this._getControl();
	if(A){C.SetVariable("method:setUrl",this.url)}
	C.SetVariable("method:play","");
	C.SetVariable("enabled","true");
	Element.hide(this.playButton);
	Element.show(this.pauseButton);
	Element.removeClassName(this.eq,"playermp3-eq-stop");
	Element.addClassName(this.eq,"playermp3-eq")};

AudioPlayer.pause=function(){
	var A=this._getControl();
	A.SetVariable("method:pause","");
	Element.hide(this.pauseButton);
	Element.show(this.playButton);
	Element.removeClassName(this.eq,"playermp3-eq");
	Element.addClassName(this.eq,"playermp3-eq-stop")};

AudioPlayer.stop=function(){
	var A=this._getControl();
	this.position=0;
	A.SetVariable("method:setPosition",this.position);
	A.SetVariable("method:stop","");
	Element.hide(this.pauseButton);
	Element.show(this.playButton);
	Element.removeClassName(this.eq,"playermp3-eq");
	Element.addClassName(this.eq,"playermp3-eq-stop")	
};

AudioPlayer.timelineClick=function(C){
	var E=this._getControl();
	var D=Element.getStyle(this.timeline,"width");
	D=parseInt(D.substr(0,D.length-2));
	var B=findPosX(this.timeline);
	var A=Event.pointerX(C);
	this.position=Math.round((A-B)/D*this.duration);
	E.SetVariable("method:setPosition",this.position);
	this.onUpdate();Event.stop(C)
};

AudioPlayer.timelineOver=function(A){App.toolTip(this.timeline,this.title,300)};

AudioPlayer.timeClick=function(B){
	var C=Element.getStyle(this.elapsedTime,"display");
	var A=Element.getStyle(this.remainingTime,"display");
	var D=Element.getStyle(this.percentLoaded,"display");
	if(C=="block"){
		this.elapsedTime.style.display="none";this.remainingTime.style.display="block";this.percentLoaded.style.display="none"
	}else{
		if(A=="block"){
			if(this.bytesPercent=="100"){
				this.elapsedTime.style.display="block";this.remainingTime.style.display="none";this.percentLoaded.style.display="none"
			}else{
			this.elapsedTime.style.display="none";this.remainingTime.style.display="none";this.percentLoaded.style.display="block"}
		}else{
		this.elapsedTime.style.display="block";this.remainingTime.style.display="none";this.percentLoaded.style.display="none"
		}
	}
};

AudioPlayer.volumeDown=function(A){this.volumePressed=true;this.volumeMove(A);Event.stop(A)};

AudioPlayer.volumeMove=function(E){
	if(this.volumePressed){
		var F=this._getControl();
		var G=Element.getStyle(this.volumeButton,"width");
		var D=Element.getStyle(this.volumeButton,"height");
		G=parseInt(G.substr(0,G.length-2));
		var C=findPosX(this.volumeButton);
		var B=findPosY(this.volumeButton);
		var A=Event.pointerX(E);
		var H=Event.pointerY(E);
		if(A<C){this.volume=0}else{
			if(A>C+G){this.volume=200}else{this.volume=Math.round((A-C)/G*200)}
		}
		F.SetVariable("method:setVolume",this.volume)
	}
};

AudioPlayer.volumeUp=function(A){this.volumePressed=false};

AudioPlayer.close=function(){
	this.stop();
	var A=this._getControl();
	A.SetVariable("enabled","false");
	Element.remove($("playermp3Display"));
	var B=$$("#top span.create");
	if(B){B.setStyle("display","")}
};

App.launchPlayer=function(A,B){AudioPlayer.play(A,B)};PodcastPlayer={};PodcastPlayer.play=function(A,B){AudioPlayer.play(A,B)};;

//26
Netvibes.UI.NoWheelScrollbar=new Class({
		initialize:function(A){
			this.element=$(A);
			if(this.element.nowheel){
				return
			}
			this.element.nowheel=true;
			this.reset();
			this.element.addEvent("mousewheel",function(B){
				if(this.element.getSize().y==this.element.getScrollSize().y){}else{B.stop();if(B.wheel<0){if(this.scrollOffset<this.element.getScrollSize().y-this.element.getSize().y){this.element.scrollTo(0,this.scrollOffset+this.scrollSize)}}else{if(B.wheel>0){if(this.scrollOffset>0){this.element.scrollTo(0,this.scrollOffset-this.scrollSize)}}}}
			}.bind(this)
			);
			this.element.addEvent("scroll",function(B){this.scrollOffset=this.element.getScroll().y}.bind(this))
		},
		reset:function(){this.scrollOffset=0;this.scrollSize=20;this.element.scrollTo(0,0)}
	}
);

Netvibes.UI.AjaxScrollbar=new Class({
		Implements:[Events,Options],
		options:{size:50,snap:80,length:-1,params:{},evalScripts:false,appendExtraParams:true,stop:false},
		initialize:function(C,B,A){
			this.setOptions(A);this.element=$(C);this.nowheel=new Netvibes.UI.NoWheelScrollbar(this.element);this.reset();this.element.addEvent("scroll",this.onScroll.bind(this));this.baseUrl=B;this.ajax=new Request({url:B,method:"get",evalScripts:this.options.evalScripts,link:"cancel"});this.ajax.addEvent("onSuccess",this.onComplete.bind(this))
		},
		reset:function(){
			this.amount=0;this.scroll={y:0};this.nowheel.reset();this.element.scrollTo(0,0);this.options.stop=false
		},
		refresh:function(){
			this.element.empty();this.reset();this.requestData()
		},
		onScroll:function(A){
			if(this.options.length>0&&(this.amount>=this.options.length)){return false}if(this.element.getScroll().y<this.scroll.y){return false}this.scroll.y=this.element.getScroll().y;var B=(100*(this.element.getScroll().y+this.element.getSize().y))/this.element.getScrollSize().y;if(B>this.options.snap&&!this.ajax.running&&!this.options.stop){this.requestData()}
		},
		requestData:function(){
			this.fireEvent("onRequest");
			new Element("div",{"class":"loading ajaxScrollbarLoader"}).setText(_("Loading...")).inject(this.element);
			if(this.options.appendExtraParams){
				var A=new Hash($merge({offset:this.amount,count:this.options.size},this.options.params));
				if(this.baseUrl.substr(0,7)=="http://"){var B=this.baseUrl+(this.baseUrl.indexOf("?")<0?"?":"&")+A.toQueryString();A.extend({url:(B)});this.ajax.options.url=UWA.proxies.ajax}
				this.ajax.send({data:A});
				this.ajax.options.url=this.baseUrl
			}else{this.ajax.send({data:this.options.params})}
		},
		onComplete:function(A,B){
			if(this.element.lastChild){$(this.element.lastChild).remove()}
			this.fireEvent("onLoad",[A,B,this.amount]);
			if(this.amount==0){this.fireEvent("onStart")}
			this.amount+=this.options.size
		},
		stop:function(){this.setOptions({stop:true})}});;

//27
Window.implement({
	getSizeInfos:function(){
		return{size:this.document.getSize(),scroll:this.document.getScroll(),scrollSize:this.document.getScrollSize()}
	}
});
///sbox
///sbox-overlay: 给sbox层做殿,这样sbox现实出来就不能在sbox以为的元素操作;sbox-window: sbox层
var SqueezeBox={
	presets:{
		offsetTop:false,size:{x:600,y:450},sizeLoading:{x:200,y:150},marginInner:{x:20,y:20},marginImage:{x:150,y:200},handler:false,target:null,closeWithOverlay:true,zIndex:997,overlayOpacity:0.4,classWindow:"",classOverlay:"overlay_squeezebox",disableFx:false,hideOnClose:true,onOpen:$empty,onClose:$empty,onUpdate:$empty,onResize:$empty,onMove:$empty,onShow:$empty,onHide:$empty,fxOverlayDuration:200,fxResizeDuration:500,fxResizeTransition:Fx.Transitions.Quint.easeOut,fxContentDuration:200,ajaxOptions:{}},
	initialize:function(A){
		if(this.options){
			return this
		}
		this.presets=$merge(this.presets,A);
		this.setOptions(this.presets).build();
		this.listeners={window:this.reposition.bind(this,[null]),close:this.close.bind(this),key:this.onKey.bind(this)};
		this.isOpen=this.isLoading=false;return this
	},
	build:function(){
		this.content=new Element("div",{id:"sbox-content"});
		this.btnClose=new Element("a",{id:"sbox-btn-close",href:"#","class":"actions-window-close"});
		this.overlay=new Element("div",{id:"sbox-overlay",styles:{display:"none",zIndex:this.options.zIndex}}).inject(document.body);
		this.win=new Element(
			"div",{id:"sbox-window",styles:{display:"none",zIndex:this.options.zIndex+2}}
		).adopt(this.btnClose,this.content).inject(document.body);
		this.fx={
			overlay:new Fx.Style(this.overlay,"opacity",{duration:this.options.fxOverlayDuration,wait:false}).set(0),
			win:new Fx.Styles(
				this.win,{duration:this.options.fxResizeDuration,transition:this.options.fxResizeTransition,wait:false,unit:"px"}),
			content:new Fx.Style(this.content,"opacity",{duration:this.options.fxContentDuration,wait:false}).set(0)
		}
	},
	addClick:function(A){return A.addEvent("click",function(){return !SqueezeBox.fromElement(this)})},
	fromElement:function(E,A){
		this.initialize();this.element=$(E);
		this.setOptions($merge(this.presets,A||{},(this.element&&this.element.rel)?JSON.evaluate(this.element.rel):{}));
		this.assignOptions();
		this.url=((this.element)?(this.options.url||this.element.getProperty("href")):E)||"";
		if(this.options.handler){var D=this.options.handler;return this.setContent(D,this.parsers[D].call(this,true))}
		var C;
		for(var B in this.parsers){
			if((C=this.parsers[B].call(this))){return this.setContent(B,C)}
		}
		return false
	},
	assignOptions:function(){
		this.overlay.setProperty("class",this.options.classOverlay);
		this.win.setProperty("class",this.options.classWindow);
		if(Browser.Engine.ie6){this.win.addClass("sbox-window-ie6")}
	},
	close:function(A){
		if(A){new Event(A).stop()}
		if(!this.isOpen){return this}
		this.fx.overlay.start(0).chain(this.toggleOverlay.bind(this));
		if(this.options.hideOnClose){this.win.setStyle("display","none")}
		this.trashImage();this.toggleListeners();this.isOpen=null;
		this.fireEvent("onClose",[this.content]).removeEvents();
		this.options={};
		this.setOptions(this.presets).callChain();
		return this
	},
	onError:function(){if(this.image){this.trashImage()}this.setContent("Error during loading")},
	trashImage:function(){if(this.image){this.image=this.image.onload=this.image.onerror=this.image.onabort=null}},
	setContent:function(A,B){
		if(!this.handlers[A]){return false}
		this.content.setProperty("class","sbox-content-"+A);
		this.applyTimer=this.applyContent.delay(this.fx.overlay.options.duration,this,this.handlers[A].call(this,B));
		if(this.overlay.$attributes.opacity){return this}
		this.toggleOverlay(true);
		this.fx.overlay.start(this.options.overlayOpacity);
		this.reposition();
		return this
	},
	applyContent:function(B,A){
		this.applyTimer=$clear(this.applyTimer);
		this.hideContent();
		if(!B){this.toggleLoading(true)}else{if(this.isLoading){this.toggleLoading(false)}this.fireEvent("onUpdate",[this.content],20)}
		this.content.empty()[["string","array",false].contains($type(B))?"setHTML":"adopt"](B||"");
		this.callChain();
		if(!this.isOpen){this.toggleListeners(true);this.resize(A,true);this.isOpen=true;this.fireEvent("onOpen",[this.content])}else{this.resize(A)}
	},
	resize:function(B,A){
		this.win.setStyle("visibility","hidden");
		var C=window.getSizeInfos();
		this.size=$merge(this.isLoading?this.options.sizeLoading:this.options.size,B);
		var D={
			width:this.size.x,
			height:this.size.y,
			left:(C.scroll.x+(C.size.x-this.size.x-this.options.marginInner.x)/2).toInt(),
			top:(C.scroll.y+(C.size.y-this.size.y-this.options.marginInner.y)/2).toInt()
		};
		$clear(this.showTimer||null);
		this.hideContent();
		if(!A){
			this.fx.win.start(D).chain(this.showContent.bind(this))
		}else{this.win.setStyles(D).setStyle("display","");this.showTimer=this.showContent.delay(50,this)}
		this.reposition(C);
		this.win.setStyle("visibility","visible");
		return this
	},
	toggleListeners:function(B){
		var A=B?"addEvent":"removeEvent";
		this.btnClose[A]("click",this.listeners.close);
		if(this.options.closeWithOverlay){this.overlay[A]("click",this.listeners.close)}
		document[A]("keydown",this.listeners.key);
		window[A]("resize",this.listeners.window)
	},
	toggleLoading:function(A){this.isLoading=A;this.win[A?"addClass":"removeClass"]("sbox-loading");if(A){this.fireEvent("onLoading",[this.win])}},
	toggleOverlay:function(A){this.overlay.setStyle("display",A?"":"none");$(document.body)[A?"addClass":"removeClass"]("body-overlayed")},
	showContent:function(){if(this.content.$attributes.opacity){this.fireEvent("onShow",[this.win])}this.fx.content.start(1)},
	hideContent:function(){if(!this.content.$attributes.opacity){this.fireEvent("onHide",[this.win])}this.fx.content.set(0)},
	onKey:function(A){switch(A.key){case"esc":this.close();break}},
	reposition:function(A){
		A=A||window.getSizeInfos();
		this.overlay.setStyles({left:A.scroll.x,top:A.scroll.y,width:A.size.x,height:A.size.y});
		this.win.setStyles({
			left:(A.scroll.x+(A.size.x-this.win.offsetWidth)/2).toInt(),
			top:this.options.offsetTop==false?(A.scroll.y+(A.size.y-this.win.offsetHeight)/2).toInt():this.options.offsetTop
		});
		return this.fireEvent("onMove",[this.overlay,this.win,A])},
	removeEvents:function(A){if(!this.$events){return this}if(!A){this.$events=null}else{if(this.$events[A]){this.$events[A]=null}}return this},
	parsers:{image:function(A){return(A||this.url.test(/\.(jpg|jpeg|png|gif|bmp)$/i))?this.url:false},
	clone:function(A){
		if($(this.options.target)){return $(this.options.target)}if(A||(this.element&&!this.element.parentNode)){return this.element}var B=this.url.match(/#([\w-]+)$/);return(B)?$(B[1]):false
	},
	url:function(A){return(A||(this.url&&!this.url.test(/^javascript:/i)))?this.url:false},
	iframe:function(A){return(A||this.url)?this.url:false},
	string:function(A){return true}},
	handlers:{
		image:function(A){
			var C,B=new Image();
			this.image=null;
			B.onload=B.onabort=B.onerror=(function(){
				B.onload=B.onabort=B.onerror=null;
				if(!B.width){this.onError.delay(10,this);return }
				var E={x:window.getWidth()-this.options.marginImage.x,y:window.getHeight()-this.options.marginImage.y};
				C={x:B.width,y:B.height};
				for(var D=2;D--;){
					if(C.x>E.x){C.y*=E.x/C.x;C.x=E.x}else{if(C.y>E.y){C.x*=E.y/C.y;C.y=E.y}}
				}
				C.x=C.x.toInt();C.y=C.y.toInt();
				this.image=(Browser.Engine.webkit419)?new Element("img",{src:this.image.src}):$(B);
				B=null;
				this.image.setProperties({width:C.x,height:C.y});
				if(this.isOpen){this.applyContent(this.image,C)}
			}).bind(this);
			B.src=A;
			if(B&&B.onload&&B.complete){B.onload()}
			return(this.image)?[this.image,C]:null
		},
		clone:function(A){return A.clone()},
		adopt:function(A){return A},
		url:function(A){
			this.ajax=new Ajax(A,this.options.ajaxOptions);this.ajax.addEvents({onSuccess:function(B){this.applyContent(B);this.ajax=null}.bind(this),onFailure:this.onError.bind(this)}).request.delay(10,this.ajax)
		},
		iframe:function(A){
			return new Element("iframe",{src:A,frameBorder:0,width:this.options.size.x,height:this.options.size.y})
		},
		string:function(A){return A}
	},
	extend:$extend
};
SqueezeBox.parsers.adopt=SqueezeBox.parsers.clone;
$extend(SqueezeBox,Events.prototype);
$extend(SqueezeBox,Options.prototype);
$extend(SqueezeBox,Chain.prototype);;

//28
var Calendar=new Class({
	initialize:function(D,B){
		this.props=Object.extend({
			blocked:[],
			classes:["calendar","prev","next","month","year","invalid","valid","inactive","active","hover"],
			days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
			direction:0,
			draggable:true,
			months:["January","February","March","April","May","June","July","August","September","October","November","December"],
			navigation:1,
			offset:0,
			pad:1,
			inject:false
		},B||{});
		if(D==null||D.length==0){return false}
		this.props.offset%=7;
		if(!this.props.inject){
			this.calendar=new Element("div",{styles:{left:"-1000px",opacity:0,position:"absolute",top:"-1000px",zIndex:1000}}).addClass(this.props.classes[0]).injectInside(document.body);
			this.calendar.coord=this.calendar.getCoordinates();
			if(window.Drag&&this.props.draggable){new Drag.Move(this.calendar)}
		}else{
			this.calendar=new Element("div").addClass(this.props.classes[0]).inject(this.props.inject)
		}
		this.fx=this.calendar.effect("opacity",{onStart:function(){if(this.element.getStyle("opacity")==0){this.element.setStyle("display","block")}},onComplete:function(){if(this.element.getStyle("opacity")==0){this.element.setStyle("display","none")}}});
		this.calendars=[];
		var F=0;
		var E=new Date();
		E.setDate(E.getDate()+this.props.direction.toInt());
		for(var A in D){
			var C={button:new Element("button",{type:"button"}),el:$(A),els:[],id:F++,month:E.getMonth(),visible:false,year:E.getFullYear()};
			this.element(A,D[A],C);
			C.el.addClass(this.props.classes[0]);
			if(!this.props.inject){
				C.button.addClass(this.props.classes[0]).addEvent("click",function(G){this.toggle(G)}.pass(C,this)).injectAfter(C.el)
			}
			C.val=this.evaluate(C);
			C.bounds=this.bounds(C);
			this.options(C);
			this.calendars.push(C);
			this.display(C)
		}
	},
	blocked:function(C){
		var A=[];var D=new Date(C.year,C.month,1).getDay();var B=new Date(C.year,C.month+1,0).getDate();this.props.blocked.each(function(G){var F=G.split(" ");for(var H=0;H<3;H++){if(!F[H]){F[H]="*"}F[H]=F[H].contains(",")?F[H].split(","):new Array(F[H])}if(F[2].contains(C.year+"")||F[2].contains("*")){if(F[1].contains(C.month+1+"")||F[1].contains("*")){F[0].each(function(I){if(I>0){A.push(I.toInt())}});if(F[3]){F[3]=F[3].contains(",")?F[3].split(","):new Array(F[3]);for(var H=0;H<B;H++){var E=(H+D)%7;if(F[3].contains(E+"")){A.push(H+1)}}}}}},this);return A},
	bounds:function(A){
		var B=new Date(1000,0,1);var F=new Date(2999,11,31);var D=new Date().getDate()+this.props.direction.toInt();if(this.props.direction>0){B=new Date();B.setDate(D+this.props.pad*A.id)}if(this.props.direction<0){F=new Date();F.setDate(D-this.props.pad*(this.calendars.length-A.id-1))}var K,C,M;A.els.each(function(N){if(N.get("name")=="select"){if(N.format.test("(y|Y)")){K=[];N.getChildren().each(function(P){var O=this.unformat(P.value,N.format);if(!K.contains(O[0])){K.push(O[0])}},this);K.sort(this.sort);if(K[0]>B.getFullYear()){d=new Date(K[0],B.getMonth()+1,0);if(B.getDate()>d.getDate()){B.setDate(d.getDate())}B.setYear(K[0])}if(K.getLast()<F.getFullYear()){d=new Date(K.getLast(),F.getMonth()+1,0);if(F.getDate()>d.getDate()){F.setDate(d.getDate())}F.setYear(K.getLast())}}if(N.format.test("(F|m|M|n)")){C=[];N.getChildren().each(function(P){var O=this.unformat(P.value,N.format);if($type(O[0])!="number"||O[0]==A.year){if(!C.contains(O[1])){C.push(O[1])}}},this);C.sort(this.sort);if(B.getFullYear()==A.year&&C[0]>B.getMonth()){d=new Date(B.getFullYear(),C[0]+1,0);if(B.getDate()>d.getDate()){B.setDate(d.getDate())}B.setMonth(C[0])}if(F.getFullYear()==A.year&&C.getLast()<F.getMonth()){d=new Date(B.getFullYear(),C.getLast()+1,0);if(F.getDate()>d.getDate()){F.setDate(d.getDate())}F.setMonth(C.getLast())}}if(N.format.test("(d|j)")&&!N.format.test("^(d|j)$")){M=[];N.getChildren().each(function(P){var O=this.unformat(P.value,N.format);if(O[0]==A.year&&O[1]==A.month){if(!M.contains(O[2])){M.push(O[2])}}},this)}}},this);var J=1;var L=new Date(A.year,A.month+1,0).getDate();var E={month:true,year:true};var I={month:true,year:true};if(A.year==B.getFullYear()){E.year=false}if(A.year==F.getFullYear()){I.year=false}if(A.year==B.getFullYear()&&A.month==B.getMonth()){if(this.props.navigation==1){E.month=false}J=B.getDate()}if(A.year==F.getFullYear()&&A.month==F.getMonth()){if(this.props.navigation==1){I.month=false}L=F.getDate()}var H=this.blocked(A);if($type(M)=="array"){M=M.filter(function(N){if(N>=J&&N<=L&&!H.contains(N)){return N}})}else{M=[];for(var G=J;G<=L;G++){if(!H.contains(G)){M.push(G)}}}M.sort(this.sort);return{days:M,months:C,years:K,prev:E,next:I,start:B,end:F}},
	caption:function(F){
		var A=new Element("caption");var D=new Element("a").addClass(this.props.classes[1]).setText("\x3c");var C=new Element("a").addClass(this.props.classes[2]).setText("\x3e");if(this.props.navigation==2){var E=new Element("span").addClass(this.props.classes[3]).injectInside(A);if(F.bounds.prev.month){D.clone().addEvent("click",function(G){this.navigate(G,"m",-1)}.pass(F,this)).injectInside(E)}E.adopt(new Element("span").setText(this.props.months[F.month]));if(F.bounds.next.month){C.clone().addEvent("click",function(G){this.navigate(G,"m",1)}.pass(F,this)).injectInside(E)}var B=new Element("span").addClass(this.props.classes[4]).injectInside(A);if(F.bounds.prev.year){D.clone().addEvent("click",function(G){this.navigate(G,"y",-1)}.pass(F,this)).injectInside(B)}B.adopt(new Element("span").setText(F.year));if(F.bounds.next.year){C.clone().addEvent("click",function(G){this.navigate(G,"y",1)}.pass(F,this)).injectInside(B)}}else{if(F.bounds.prev.month&&this.props.navigation){D.clone().addEvent("click",function(G){this.navigate(G,"m",-1)}.pass(F,this)).injectInside(A)}A.adopt(new Element("span").addClass(this.props.classes[3]).setText(this.props.months[F.month]));A.adopt(new Element("span").addClass(this.props.classes[4]).setText(F.year));if(F.bounds.next.month&&this.props.navigation){C.clone().addEvent("click",function(G){this.navigate(G,"m",1)}.pass(F,this)).injectInside(A)}}return A},
	changed:function(A){
		A.val=this.evaluate(A);A.bounds=this.bounds(A);this.options(A);if(A.val){if(A.val.getDate()<A.bounds.days[0]){A.val.setDate(A.bounds.days[0])}if(A.val.getDate()>A.bounds.days.getLast()){A.val.setDate(A.bounds.days.getLast())}A.els.each(function(B){B.value=this.format(A.val,B.format)},this)}if(!A.val){return }this.check(A);if(A.visible){this.display(A)}},
	clicked:function(A){
		this.options(A);A.els.each(function(B){B.value=this.format(A.val,B.format);if(this.props.onChange){this.props.onChange(B.value)}if(this.props.inject){this.display(A)}},this)},
	check:function(A){
		if(!A.val){return }this.calendars.each(function(D,B){if(D.val){var E=false;if(B<A.id){var C=new Date(Date.parse(A.val));C.setDate(C.getDate()-(this.props.pad*(A.id-B)));if(C<D.val){E=true}}if(B>A.id){var C=new Date(Date.parse(A.val));C.setDate(C.getDate()+(this.props.pad*(B-A.id)));if(C>D.val){E=true}}if(E){if(D.bounds.start>C){C=D.bounds.start}if(D.bounds.end<C){C=D.bounds.end}D.val=C;D.month=C.getMonth();D.year=C.getFullYear();D.bounds=this.bounds(D);this.clicked(D);if(D.visible){this.display(D)}}}},this)},
	display:function(C){
		this.calendar.empty();this.calendar.className=this.props.classes[0]+" "+this.props.months[C.month].toLowerCase();var B=new Element("div").injectInside(this.calendar);var Q=new Element("table").injectInside(B).adopt(this.caption(C));var L=new Element("thead").injectInside(Q);var M=new Element("tr").injectInside(L);for(var I=0;I<=6;I++){var D=this.props.days[(I+this.props.offset)%7];M.adopt(new Element("th",{title:D}).setText(D.substr(0,1)))}var J=new Element("tbody").injectInside(Q);var M=new Element("tr").injectInside(J);var H=new Date(C.year,C.month,1).getDay()-this.props.offset;var O=new Date(C.year,C.month+1,0).getDate();var K=new Date(C.year,C.month,0).getDate();var G=this.value(C);var E=[];this.calendars.each(function(R){if(R!=C&&R.val){if(C.year==R.val.getFullYear()&&C.month==R.val.getMonth()){E.push(R.val.getDate())}}},this);var A=C.bounds.days;for(var I=1;I<43;I++){if((I-1)%7==0){M=new Element("tr").injectInside(J)}var F=new Element("td").injectInside(M);var N=I-H;var P="";if(N===G){P=this.props.classes[8]}else{if(E.contains(N)){P=this.props.classes[7]}else{if(A.contains(N)){P=this.props.classes[6]}else{if(N>=1&&N<=O){P=this.props.classes[5]}}}}F.addClass(P);if(A.contains(N)){F.setProperty("title",this.format(new Date(C.year,C.month,N),"D M jS Y"));F.addEvents({click:function(T,R,S){S.val=(this.value(S)==R)?null:new Date(S.year,S.month,R);this.clicked(S);if(!S.val){S.val=this.evaluate(S)}if(S.val){this.check(S);if(!this.props.inject){this.toggle(S)}}else{T.addClass(this.props.classes[6]);T.removeClass(this.props.classes[8])}}.pass([F,N,C],this),mouseover:function(S,R){S.addClass(R)}.pass([F,this.props.classes[9]]),mouseout:function(S,R){S.removeClass(R)}.pass([F,this.props.classes[9]])})}if(N<1){N=K+N}else{if(N>O){N=N-O}}F.setText(N)}},
	element:function(B,C,D){
		if($type(C)=="object"){for(var A in C){this.element(A,C[A],D)}return }B=$(B);B.format=C;if(B.get("name")=="select"){B.addEvent("change",function(E){this.changed(E)}.pass(D,this))}else{B.readOnly=true;B.addEvent("focus",function(E){this.toggle(E)}.pass(D,this))}D.els.push(B)},
	evaluate:function(C){
		var A=[null,null,null];C.els.each(function(F){var E=this.unformat(F.value,F.format);E.each(function(H,G){if($type(H)=="number"){A[G]=H}})},this);if($type(A[0])=="number"){C.year=A[0]}if($type(A[1])=="number"){C.month=A[1]}var D=null;if(A.every(function(E){return $type(E)=="number"})){var B=new Date(A[0],A[1]+1,0).getDate();if(A[2]>B){A[2]=B}D=new Date(A[0],A[1],A[2])}return(C.val==D)?null:D},
	format:function(A,E){
		var D="";if(A){var G=A.getDate();var J=this.props.days[A.getDay()];var B=A.getMonth()+1;var F=this.props.months[A.getMonth()];var I=A.getFullYear()+"";for(var C=0;C<E.length;C++){var H=E.charAt(C);switch(H){case"y":I=I.substr(2);case"Y":D+=I;break;case"m":if(B<10){B="0"+B}case"n":D+=B;break;case"M":F=F.substr(0,3);case"F":D+=F;break;case"d":if(G<10){G="0"+G}case"j":D+=G;break;case"D":J=J.substr(0,3);case"l":D+=J;break;case"S":if(G%10==1&&G!="11"){D+="st"}else{if(G%10==2&&G!="12"){D+="nd"}else{if(G%10==3&&G!="13"){D+="rd"}else{D+="th"}}}break;default:D+=H}}}return D},
	navigate:function(C,B,D){
		switch(B){case"m":if($type(C.bounds.months)=="array"){var A=C.bounds.months.indexOf(C.month)+D;if(A<0||A==C.bounds.months.length){if(this.props.navigation==1){this.navigate(C,"y",D)}A=(A<0)?C.bounds.months.length-1:0}C.month=C.bounds.months[A]}else{var A=C.month+D;if(A<0||A==12){if(this.props.navigation==1){this.navigate(C,"y",D)}A=(A<0)?11:0}C.month=A}break;case"y":if($type(C.bounds.years)=="array"){var A=C.bounds.years.indexOf(C.year)+D;C.year=C.bounds.years[A]}else{C.year+=D}break}C.bounds=this.bounds(C);if($type(C.bounds.months)=="array"){var A=C.bounds.months.indexOf(C.month);if(A<0){C.month=C.bounds.months[0]}}this.display(C)},
	options:function(A){
		A.els.each(function(B){
			if(B.get("name")=="select"&&B.format.test("^(d|j)$")){
				var C=this.value(A);
				if(!C){C=B.value.toInt()}
				B.empty();
				A.bounds.days.each(function(D){
					var E=new Element("option",{selected:(C==D),value:((B.format=="d"&&D<10)?"0"+D:D)}).setText(D).injectInside(B)
				},this)
			}
		},this)},
	sort:function(B,A){
		return B-A},
	toggle:function(B){
		if(!this.props.inject){document.removeEvent("mousedown",this.fn)}if(B.visible){B.visible=false;B.button.removeClass(this.props.classes[8]);this.fx.start(1,0)}else{this.fn=function(G,F){var G=new Event(G);var E=G.target;var D=false;while(E!=document.body&&E.nodeType==1){if(E==this.calendar){D=true}this.calendars.each(function(H){if(H.button==E||H.els.contains(E)){D=true}});if(D){G.stop();return false}else{E=E.parentNode}}this.toggle(F)}.create({"arguments":B,bind:this,event:true});if(!this.props.inject){document.addEvent("mousedown",this.fn)}this.calendars.each(function(D){if(D==B){D.visible=true;D.button.addClass(this.props.classes[8])}else{D.visible=false;D.button.removeClass(this.props.classes[8])}},this);var C=B.button.getCoordinates();var A=window.getSize().size;if(C.right+this.calendar.coord.width>A.x){C.right-=(C.right+this.calendar.coord.width-A.x)}if(C.top+this.calendar.coord.height>A.y){C.top-=(C.top+this.calendar.coord.height-A.y)}this.calendar.setStyles({left:C.right+"px",top:C.top+"px"});this.display(B);this.fx.start(0,1)}},
	unformat:function(B,G){
		G=G.escapeRegExp();var I={d:"([0-9]{2})",j:"([0-9]{1,2})",D:"("+this.props.days.map(function(J){return J.substr(0,3)}).join("|")+")",l:"("+this.props.days.join("|")+")",S:"(st|nd|rd|th)",F:"("+this.props.months.join("|")+")",m:"([0-9]{2})",M:"("+this.props.months.map(function(J){return J.substr(0,3)}).join("|")+")",n:"([0-9]{1,2})",Y:"([0-9]{4})",y:"([0-9]{2})"};var E=[];var F="";for(var C=0;C<G.length;C++){var H=G.charAt(C);if(I[H]){E.push(H);F+=I[H]}else{F+=H}}var D=B.match("^"+F+"$");var A=new Array(3);if(D){D=D.slice(1);E.each(function(K,J){J=D[J];switch(K){case"y":J="19"+J;case"Y":A[0]=J.toInt();break;case"F":J=J.substr(0,3);case"M":J=this.props.months.map(function(L){return L.substr(0,3)}).indexOf(J)+1;case"m":case"n":A[1]=J.toInt()-1;break;case"d":case"j":A[2]=J.toInt();break}},this)}return A},
	value:function(B){var A=null;if(B.val){if(B.year==B.val.getFullYear()&&B.month==B.val.getMonth()){A=B.val.getDate()}}return A}
});;
//29
Netvibes.UI.MultiPage=new Class({
	Implements:[Events,Options],
	options:{
		className:"multipage",
		nextText:_("next"),
		previousText:_("previous"),
		items:[],
		perPage:10,
		displayTotal:false,
		layout:{
			availableWidth:-1,
			itemWidth:-1,
			numRows:-1,
			computePerRequest:false
		}
	},
	initialize:function(A){
		this.setOptions(A);////Options类
		this.offset=0;
		this.currentPage=1;
		this.items=this.options.items;
		this.total=this.items.length;
		this.ajax=null;
		this.build();
		if(this.options.layout.availableWidth>0){
			this.options.perPage=Math.floor(this.options.layout.availableWidth/this.options.layout.itemWidth)*this.options.layout.numRows;
			if(this.options.layout.computePerRequest){this.options.perRequest=this.options.perPage}
		}
		if(this.items.length){this.computeState()}
	},
	build:function(){
		this.container=new Element("p",{"class":this.options.className});
		this.prev=new Element("a",{"class":"prev disabled",rel:"prev",href:"javascript:void(0)"});
		this.prev.adopt(new Element("span").setText(this.options.previousText));
		this.prev.setProperty("hidefocus","hidefocus").addEvent("click",this.onPageChanged.bindWithEvent(this)).inject(this.container);
		this.infos=new Element("em").inject(this.container);
		this.next=new Element("a",{"class":"next disabled",rel:"next",href:"javascript:void(0)"});
		this.next.adopt(new Element("span").setText(this.options.nextText));
		this.next.setProperty("hidefocus","hidefocus").addEvent("click",this.onPageChanged.bindWithEvent(this)).inject(this.container);
		return this.container
	},
	inject:function(A,B){
		$(A).adopt(this.container);
		return this
	},
	show:function(){
		if(this.total>this.options.perPage){this.container.setStyle("display","")}
		return this
	},
	hide:function(){
		this.container.setStyle("display","none");
		return this
	},
	onPageChanged:function(B){
		var A=Event.findElement(B,"A");
		if(!A||A.hasClass("disabled")||this.container.hasClass("loading")){return false}
		if(A.rel=="prev"){
			this.offset=this.offset-this.options.perPage
		}else{
			if(A.rel=="next"){
				if(this.ajax&&this.ajax.running){return false}
				this.offset=this.offset+this.options.perPage;
				if((this.offset+this.options.perPage)>this.items.length&&this.items.length<this.total){
					this.onRequesting(this.items.length);
					return false
				}
			}
		}
		this.computeState();
		return false
	},
	onRequesting:function(A){
		this.container.addClass("loading");
		this.infos.setText(_("Loading..."));
		this.fireEvent("onRequesting",[this.ajax,A,this.options.perPage,this.options.perRequest]);
		if(this.ajax.options.data==""){
			this.ajax.get({
				offset:A,
				count:this.options.perRequest,
				format:"json"
			})
		}else{
			this.ajax.get()
		}
	},
	computeState:function(){
		this.currentPage=(this.offset/this.options.perPage)+1;
		var B={
			items:this.items.slice(this.offset,this.offset+this.options.perPage),
			page:{
				current:this.currentPage,
				offset:this.offset,
				total:this.total,
				size:this.options.perPage
			}
		};
		var D=this.offset+1;
		var C=this.offset+this.options.perPage;
		var A=D+"-"+(C>this.total?this.total:C);
		if(this.options.displayTotal){A+=" / "+this.total}
		if(this.total==0){A="--"}
		this.infos.setText(A);
		this.prev.className=(this.offset>0)?"prev":"prev disabled";
		this.next.className=(this.offset<this.total-this.options.perPage)?"next":"next disabled";
		////同时 触发 请求完成事件
		this.fireEvent("onPageChange",B)
	}
});
	
Netvibes.UI.MultiPage.JSON=new Class({
	Extends:Netvibes.UI.MultiPage,
	options:{requestUrl:"",perRequest:50,responseParams:{items:"",total:""}},
	initialize:function(A){
		arguments.callee.parent(A);
		this.ajax=new Request.JSON({
			url:A.requestUrl,
			link:"cancel",
			secure:false,
			onComplete:this.onComplete.bind(this),
			onFailure:this.onFailure.bind(this)
		});
		this.onRequesting(0)
	},
	onComplete:function(B){
		if(B.success!=undefined&&B.success==false){
			var A={error:B.error||"Unknown error"};
			this.infos.setText("--");
			this.fireEvent("onPageChange",A);
			return false
		}
		this.container.removeClass("loading");
		this.items.merge(B[this.options.responseParams.items]);
		this.total=B[this.options.responseParams.total].toInt();
		this.computeState()
	},
	onFailure:function(){
		this.fireEvent("onFailure");
		this.infos.setText("--");
		return false
	}
});;

//30
var Countable=new Class({
	Implements:[Options],options:{className:"countable",errorClass:"error"},initialize:function(B,A,C){this.input=$(B);this.max=A;this.handle=new Element("div",{"class":this.options.className});this.handle.setHTML("&nbsp;").injectAfter(this.input);this.input.addEvent("keydown",this.onKeyPress.bindWithEvent(this));this.input.addEvent("keyup",this.onKeyPress.bindWithEvent(this));this.update()},onKeyPress:function(A){A=new Event(A);if(!A.shift&&!A.control&&!A.alt&&!A.meta){this.update()}},update:function(){if(this.input.value.length>this.max){this.input.value=this.input.value.substring(0,this.max)}var B=this.max-this.input.value.length;if(B==0){var A='<span class="'+this.options.errorClass+'">'+_("No characters left")+"</span>"}else{if(B==1){var A=_("1 character left")}else{var A=String.format(_("{0} characters left"),B)}}this.handle.setHTML(A)}});;

//31
Netvibes.UI.Timeline=new Class({
	Implements:[Options],options:{url:"/rest/timeline",headers:{Accept:"text/json","Content-type":"text/json"},id:null,widget:null,icons:null,search:null,timelineSize:20,pagerSize:5},elements:{},widget:null,pagerOffset:0,initialize:function(C){var B=null;if(C.widget){this.widget=C.widget;delete C.widget}this.setOptions(C);if(this.options.search==null&&!this.widget){throw'The option "search" is mandatory'}this.elements.container=new Element("div",{id:(typeof this.options.id=="string"?this.options.id:""),"class":"timeline"});this.elements.events=new Element("ul",{"class":"events"}).inject(this.elements.container);if(!this.widget){var C={size:this.options.timelineSize,params:{format:"json",query:this.options.search,count:null}};this.elements.scrollbar=new Netvibes.UI.AjaxScrollbar(this.elements.events,this.options.url,C);this.elements.scrollbar.addEvent("onLoad",this.onLoadData.bind(this));this.elements.scrollbar.requestData()}else{var A={count:this.options.timelineSize};var D=new Request({url:this.options.url,method:"get"});new Element("li",{"class":"odd"}).setText(_("Loading...")).inject(this.elements.events);D.addEvent("onSuccess",this.onLoadData.bind(this));D.send({data:A})}},onLoadData:function(D,E,F){var C=JSON.decode(D,false);if(C.timeline){if(this.widget){this.elements.events.empty()}if(C.timeline.length==0){if(this.elements.scrollbar){this.elements.scrollbar.stop()}if(F==0||this.widget){new Element("p",{"class":"empty",text:_("No events")}).inject(this.elements.events)}}else{if(this.widget){for(var A=0;A<C.timeline.length;A++){var B=Netvibes.UI.Timeline.Renderer[C.timeline[A].type];if(!B){C.timeline.splice(A,1)}}}this.build(C.timeline)}}},getElement:function(){return this.elements.container},buildPager:function(C){var A=new UWA.Controls.Pager({module:this.widget,limit:this.options.pagerSize,offset:this.pagerOffset,dataArray:C});A.onChange=function(E){this.elements.events.empty();this.pagerOffset=E;this.build(C)}.bind(this);var D=new Element("div").inject(this.elements.events);var B=A.getContent();$(B).inject(D)},build:function(F){var G=(this.widget)?parseInt(this.pagerOffset):0;var C=F.length;var B=0;for(var D=G;D<C&&D<F.length;D++){var E=Netvibes.UI.Timeline.Renderer[F[D].type];if(E){var A=new Element("li",{"class":"event"+(B%2==1?" odd":" even")}).inject(this.elements.events);this.renderEvent(A,F[D],E);B++;if(this.widget&&B==parseInt(this.options.pagerSize)){break}}}if(this.widget){this.buildPager(F)}},renderEvent:function(H,A,G){H.empty();new Element("span",{"class":"date",text:String.parseRelativeTime(A.updatedOn)}).inject(H);new Element("img",{src:"http://"+NV_AVATARS+"/"+A.userId+"/32","class":"avatar",height:"32",width:"32"}).inject(H).addEvent("click",function(){App.Panel.showProfile(this.userId);return false}.bind(A));var K=new Element("div",{"class":"content"}).inject(H);if(G.icon){var L=(this.options.icons&&typeof (this.options.icons[A.type]=="string"))?this.options.icons[A.type]:G.icon(A);new Element("img",{src:L,"class":"icon"}).inject(K)}var J=G.text(A,H);if(typeof J=="string"){new Element("span",{text:J}).inject(K)}else{if(typeof J=="object"){J.inject(K)}}if(typeof A.comment=="string"&&A.comment.length>0){new Element("div",{"class":"comment"}).setHTML(A.comment.nl2br().setURL()).inject(K)}else{A.comment=""}var B=new Element("div",{"class":"options"});if(A.userId==Cookie.get("activeUserID")){var C=new Element("a",{"class":"addComment",href:"javascript:void(0);",text:_("Comment")}).inject(B).addEvent("click",function(O,M){var P=M.getElementsByClassName("comment");if(P.length==1){var Q=P[0]}else{var Q=new Element("div",{"class":"comment"}).injectBefore(B)}Q.old=O.comment;Q.empty();Q.event=O;Q.timeline=this;var N=function(R){if((R.type=="keyup"&&(R.code==13||R.code==10))||(R.type=="click"&&R.target.name=="ok")){var S=this.firstChild.value;this.firstChild.value=(_("Saving..."));this.firstChild.disabled="disabled";this.event.comment=S;new Request().setHeader("X-Requested-Method","put").setHeader("Accept","application/json").addEvent("onComplete",function(U,T){U.empty();if(T==""){U.remove()}else{U.setHTML(T.stripTags().setURL())}}.pass([this,S])).post(this.timeline.options.url+"/"+this.event.id,this.event)}if((R.type=="keyup"&&R.code==27)||(R.type=="click"&&R.target.name=="cancel")){this.empty();if(this.old==""){this.remove()}else{this.set("text",this.old)}}}.bind(Q);new Element("textarea",{"class":"text",text:Q.old}).inject(Q).focus();new Element("input",{type:"button",value:_("Cancel"),name:"cancel"}).addEvent("click",N).inject(Q);new Element("input",{type:"button",value:_("Ok"),name:"ok"}).addEvent("click",N).inject(Q)}.pass([A,H],this));var D=function(){new Request().setHeader("X-Requested-Method","delete").setHeader("Accept","application/json").addEvent("onComplete",function(){this.addClass("deleted");this.getElementsByClassName("options")[0].remove();this.getElements("a").removeEvents()}.bind(H)).get(this.options.url+"/"+A.id)}.bind(this);var I=new Element("a",{"class":"delete",href:"javascript:void(0);",text:_("Delete")}).inject(B).addEvent("click",function(){if(confirm(_("Are you sure you want to delete this event?"))){D()}});if(A.type==12){var F=new Element("a",{"class":"restore",href:"javascript:void(0);",text:_("Restore")}).inject(B).addEvent("click",function(){var M=new App.UI.Preview({archive:A.data.moduleId,timelineId:A.id});M.addEvent("addToMyPage",function(){H.addClass("deleted");H.getElementsByClassName("options")[0].remove()});M.open()})}}else{if(A.type==6&&Netvibes.Starring){var E=new Element("a",{"class":"star",href:"javascript:void(0);",text:_("Share as favorite")}).inject(B).addEvent("click",function(M){Netvibes.Starring.showPopup($merge(M.data,{fromUserId:M.userId}))}.pass([A]))}}if(B.getFirst()){B.inject(K)}}});
Netvibes.UI.Timeline.Query={"private":"status:private","public":"status:public",friends:"user:friends ( type:star OR type:status )"};
Netvibes.UI.Timeline.Helper={
	name:function(A){return new Element("a",{"class":"username",text:A.userFullName,href:"http://"+NV_HOST+"/"+A.userName}).addEvent("click",function(){App.Panel.showProfile(this.userId);return false}.bind(A))},feed:function(B){var A=(B.type==2?"feedSubscribe":"feedUnsubscribe");return new Element("a",{"class":A,href:"javascript:void(0);",text:B.data.title}).addEvent("click",function(){var C={moduleName:"RssReader",title:this.data.title,data:{feedUrl:this.data.url}};App.Panel.AddContent.showPopup(C)}.bind(B))},widget:function(B){var A=(B.type==4?"widgetAdd":"widgetRemove");return new Element("a",{"class":A,href:"javascript:void(0);",text:B.data.title}).addEvent("click",function(){if(this.data.name=="MultipleFeeds"){var C={moduleName:this.data.name,title:this.data.title,data:this.data.data}}else{var C={moduleName:this.data.name,title:this.data.title,data:{moduleUrl:this.data.url}}}App.Panel.AddContent.showPopup(C)}.bind(B))},friend:function(B){var A=(B.type==8?"friendSubscribe":"friendUnsubscribe");return new Element("a",{"class":A,href:"http://"+NV_HOST+"/"+B.data.friendName,text:B.data.friendFullName}).addEvent("click",function(){App.Panel.showProfile(this.data.friendId);return false}.bind(B))},fromUser:function(A){return new Element("a",{"class":"username",text:A.data.fromUserFullName,href:"http://"+NV_HOST+"/"+A.data.fromUserName}).addEvent("click",function(){App.Panel.showProfile(this.data.fromUserId);return false}.bind(A))},twitterify:function(A){return A.setURL()}};
Netvibes.UI.Timeline.Renderer={
	1:{text:function(A){if(A.userId==Cookie.get("activeUserID")){return new Element("span").interpolate(_("You {status}"),{status:new Element("em").setHTML(Netvibes.UI.Timeline.Helper.twitterify(A.data))})}else{return new Element("span").interpolate("{name} {status}",{name:Netvibes.UI.Timeline.Helper.name(A),status:new Element("em").setHTML(Netvibes.UI.Timeline.Helper.twitterify(A.data))})}},nostatus:true},
	2:{icon:function(A){return"/img/timeline/feed_add.png"},text:function(A){if(A.userId==Cookie.get("activeUserID")){return new Element("span").interpolate(_("You subscribed to {feed}"),{feed:Netvibes.UI.Timeline.Helper.feed(A)})}else{return new Element("span").interpolate(_("{name} subscribed to {feed}"),{name:Netvibes.UI.Timeline.Helper.name(A),feed:Netvibes.UI.Timeline.Helper.feed(A)})}}},
	4:{icon:function(A){return"/img/timeline/application_add.png"},text:function(A){if(A.userId==Cookie.get("activeUserID")){return new Element("span").interpolate(_("You added {widget}"),{widget:Netvibes.UI.Timeline.Helper.widget(A)})}else{return new Element("span").interpolate(_("{name} added {widget}"),{name:Netvibes.UI.Timeline.Helper.name(A),widget:Netvibes.UI.Timeline.Helper.widget(A)})}}},
	6:{icon:function(A){return"/img/timeline/starring.png"},text:function(A){if(A.data.fromUserId&&A.status=="public"){return new Element("span").interpolate(_("{name} broadcasted: {friend} shared as favorite {link}"),{name:Netvibes.UI.Timeline.Helper.name(A),link:new Element("a",{href:A.data.url,"class":"star",target:"_blank",text:A.data.title}),friend:Netvibes.UI.Timeline.Helper.fromUser(A)})}else{return new Element("span").interpolate(_("{name} shared as favorite {link}"),{name:Netvibes.UI.Timeline.Helper.name(A),link:new Element("a",{href:A.data.url,"class":"star",target:"_blank",text:A.data.title})})}}},
	7:{icon:function(A){return"/favicon.ico"},text:function(A){return new Element("span",{text:_("Your account has been created")})},nostatus:true},
	8:{icon:function(A){return"/img/universe.png"},text:function(A){if(A.userId==Cookie.get("activeUserID")){return new Element("span").interpolate(_("You are now following {name2}"),{name2:Netvibes.UI.Timeline.Helper.friend(A)})}else{return new Element("span").interpolate(_("{name1} are now following {name2}"),{name1:Netvibes.UI.Timeline.Helper.name(A),name2:Netvibes.UI.Timeline.Helper.friend(A)})}}},
	9:{icon:function(A){return"/img/universe.png"},text:function(A){if(A.userId==Cookie.get("activeUserID")){return new Element("span").interpolate(_("You are not following {name2} anymore"),{name2:Netvibes.UI.Timeline.Helper.friend(A)})}else{return new Element("span").interpolate(_("{name1} is not following {name2} anymore"),{name1:Netvibes.UI.Timeline.Helper.name(A),name2:Netvibes.UI.Timeline.Helper.friend(A)})}}},
	10:{icon:function(A){return"/img/timeline/feed_add.png"},text:function(A){return new Element("span").interpolate(_("{feed} has been imported to your activites"),{feed:Netvibes.UI.Timeline.Helper.feed(A)})}},
	11:{icon:function(A){return"/favicon.ico"},text:function(A){return new Element("span",{text:_("Your account has been migrated")})},nostatus:true},
	12:{icon:function(A){return"/img/timeline/archived_widget.png"},text:function(C,B){var A=C.data.page=="public"?_("You archived the widget {title} from your universe"):_("You archived the widget {title} from your private page");return new Element("span").interpolate(A,{title:new Element("a",{href:"javascript:void(0)","class":"archive",text:C.data.title}).addEvent("click",function(E){var D=new App.UI.Preview({archive:C.data.moduleId,timelineId:C.id});D.addEvent("addToMyPage",function(){B.addClass("deleted");B.getElementsByClassName("options")[0].remove();B.getElements("a").removeEvents()});D.open()})})},nostatus:true},
	15:{icon:function(A){return"/img/timeline/starring.png"},text:function(A){return new Element("span").interpolate(_("{name} shared a widget as favorite: {link}"),{name:Netvibes.UI.Timeline.Helper.name(A),link:new Element("a",{href:"/subscribe.php?preconfig="+A.data.preconfig,"class":"star",target:"_blank",text:A.data.title}).addEvent("click",function(B){B.stop();new App.UI.Preview({preconfig:A.data.preconfig}).open()})})},nostatus:true}};;

//32
Netvibes.UI.Balloon=new Class({
	Implements:[Options],options:{id:"balloon",className:"balloon",width:300},initialize:function(A){this.setOptions(A);this.build();return this},build:function(){this.smWindow=new Element("div",{id:this.options.id,"class":this.options.className,styles:{position:"absolute",zIndex:0,width:this.options.width+"px",display:"none"}});this.closeButton=new Element("img",{src:App.getStaticUrl("/img/closeMod.gif"),id:"shareClose",alt:"","class":"close"}).inject(this.smWindow).addEvent("click",this.hide.bindWithEvent(this));this.content=new Element("div",{"class":"content"});document.getElementsByTagName("body")[0].appendChild(this.smWindow);this.smWindow.appendChild(this.content)},show:function(A){var C=A.target.getPosition();var B=C.x+30;if(Browser.getDocumentWidth()-this.options.width<B){this.smWindow.className="balloonRight";B-=this.options.width-47}else{this.smWindow.className="balloon";B-=33}Element.setStyle(this.smWindow,{left:B+"px",top:(C.y+A.target.getSize().y)+"px"});this.smWindow.show()},hide:function(A){A.stop();this.smWindow.destroy()}});;

//33
App.UI.Message=new Class({
	Implements:[Events,Options],options:{title:"",text:"",type:"info",closeButton:{"class":"close actions-window-close",title:_("Close"),width:16,height:16},actionButton:null,fx:true},initialize:function(A){this.setOptions(A);this.options.fx=(App.userCustom.enableFx==1)},inject:function(B,A){this.build().inject(B,A);return this},build:function(){this.box=new Element("div",{id:"messageBox","class":"messageBox messageBox-"+this.options.type,styles:{display:"none"}});if(this.options.fx){this.box.set("tween",{duration:600})}this.content=new Element("div",{"class":"content"}).inject(this.box);if(this.options.title){var E=new Element("h2",{text:this.options.title}).inject(this.content);if(!this.options.text){E.addClass("message")}}if(this.options.text){new Element("p",{"class":"description",html:this.options.text}).inject(this.content)}if(this.options.actionButton){var D=new Element("div",{"class":"action"}).inject(this.box);var C=new Element("div").inject(D);var B=new Element("a",{"class":"nv-button",events:{click:this.onButtonClick.bindWithEvent(this)}}).adopt(new Element("span",{text:this.options.actionButton.text})).inject(C)}if(this.options.closeButton){var A=new Element("img",{src:App.getStaticUrl("/img/s.gif"),events:{click:this.close.bindWithEvent(this)}}).set(this.options.closeButton).inject(this.box);this.box.addClass("messageBox-closable")}return this.box},open:function(){if(this.options.fx){this.box.setOpacity(0).show().get("tween","opacity").start(0.99999)}else{this.box.show()}},close:function(A){if(this.closing===true){return }if(this.options.fx){this.closing=true;this.box.get("tween","opacity").start(0.99999,0).chain((function(){this.box.style.display="none";this.fireEvent("onClose");this.closing=false}).bind(this))}else{this.box.hide();this.fireEvent("onClose")}},setMessage:function(A){this.content.set("html",A);this.fireEvent("onMessageSetted");this.open()},onButtonClick:function(){}});
App.UI.Message._instance=null;
App.showMessage=function(A){
	if(null==App.UI.Message._instance){App.UI.Message._instance=new App.UI.Message({text:A}).inject("maintable","top")}App.UI.Message._instance.setMessage(A)};
App.messageWithID=function(C,B){
	if(typeof C!="number"){throw new Error("messageWithID : id is mandatory")}if(!App.userCustom.announcement){throw new Error("messageWithID : Annouvements array doesn't exist")}if(!App.userCustom.announcement.contains(C)){var A=new App.UI.Message({id:C,text:B});A.inject("maintable","top").open();return A}
};
App.UI.Message.Welcome=new Class({
	Extends:App.UI.Message,
	options:{
		title:_("Welcome to your personalized page!"),
		text:_("This wizard will help you create your very own start page."),
		type:"action welcome",
		closeButton:null,
		actionButton:{text:_("Start")},
		id:100
	},
	build:function(){
		var B=arguments.callee.parent();
		var C=new Element(
			"a",{text:_("No thanks"),href:"javascript:void(0)",events:{click:this.onDismiss.bindWithEvent(this)}}
		).inject(B.getElement("div.action"));
		if(!App.registeredUser){
			var A=new Element("div",{"class":"openMyPage"});
			A.adopt(new Element("h3",{text:_("You are already registered?")}));
			A.adopt(new Element("a",{text:_("Open session"),href:"javascript:void(0)",events:{click:this.onOpenMyPage.bind(this)}}));
			A.inject(B)
		}else{B.getElement("div.content").style.width="70%"}
		return B
	},
	onOpenMyPage:function(){App.Login.show()},
	onDismiss:function(A){App.userCustom.announcement.push(this.options.id);App.saveUserCustom();this.close()},
	onButtonClick:function(){App.showWizardCustom()}});
	
App.UI.Message.SaveYourPage=new Class({
	Extends:App.UI.Message,options:{title:_("To access your startpage anywhere, anytime and on any device"),type:"action",closeButton:null,actionButton:{text:_("Sign up now, it's free")}},onButtonClick:function(){App.showSignup()}});
App.UI.Message.ConfirmRegistered=new Class({
	Extends:App.UI.Message,options:{title:_("Congratulations, you're now registered!"),text:_("Your data are saved! Last step now is to create your public page to publish your own page."),type:"action registered",actionButton:{text:_("Create your public page")}},onButtonClick:function(){App.showCreateUniverseWizard()}});
App.UI.Message.FindFriends=new Class({
	Extends:App.UI.Message,options:{title:_("Congratulations!"),text:_("Your public page is available here: {0}. Invite your friends to discover your digital life.").format('<a href="http://'+NV_HOST+"/"+User.username+'">'+NV_HOST+"/"+User.username+"</a>"),type:"action registered",actionButton:{text:_("Find friends on Netvibes")}},onButtonClick:function(){App.Panel.open("Friends");App.Panel.Friends.tabs.selectTab("addFriends")}});
	
App.showMessageBox=function(A){var B=new App.UI.Message[A];B.inject("maintable","top").open()};;

//34
////module预览
App.UI.Preview=new Class({
	Implements:[Events],
	initialize:function(C){
		if(typeof C=="string"){C=JSON.decode(C)}
		if(typeof C=="object"){
			if(C.preconfig){
				this.ajax=new Request.JSON({
					secure:false,
					method:"get",
					url:"/rest/widget/preconfig/"+C.preconfig,
					onComplete:this.onLoadComplete.bind(this)
				})
			}else{
				if(C.archive){
					this.ajax=new Request.JSON({
						secure:false,
						method:"get",
						url:"/rest/widget/archive/"+C.archive,
						onComplete:this.onLoadComplete.bind(this)
					});
					this.archiveId=C.archive;this.timelineId=C.timelineId
				}else{
					var A=$unlink(C);
					A.moduleName=C.moduleName||C.name;
					A.isNew=true;
					if(C.campaignActive){
						var B={ecoId:(A.ecoId||A.widgetId)};
						if(A.fromQuery){B.query=A.fromQuery}
						App.report("adc.spon.preview",B)
					}
					////获得module内容
					this.previewModule=new Module(A,{nativise:true,preview:true})
				}
			}
		}else{throw new Error("App.UI.Preview: constructor needs object or serialized dataObj")}
		return this
	},
	open:function(){
		SqueezeBox.fromElement(this.build(),{
			handler:"adopt",offsetTop:100,size:{x:400,y:null},onOpen:function(){this.reposition()}
		});
		return this
	},
	build:function(){
		var A=new Element("div");
		var C=new Element("div",{"class":"header"}).inject(A);
		this.widget=new Element("div").inject(A);
		if(!App.visit||App.visit.my){
			////添加到我的页面
			var B=this.archiveId?_("Restore this widget"):_("Add to my page");
			this.button=new Element(
				"a",{"class":"add-button",
					href:"javascript:void(0)",
					text:B,
					events:{click:this.onAddToMyPage.bindWithEvent(this)}}
			).inject(C)
		}
		if(this.ajax){this.widget.wait();this.ajax.send()}else{this.displayPreview()}
		return A
	},
	onLoadComplete:function(B){
		var A=$unlink(B.widget);A.moduleName=A.name;A.isNew=true;
		this.previewModule=new Module(A,{nativise:true,preview:true});
		this.widget.empty();
		this.displayPreview();
		delete this.ajax;this.ajax=null
	},
	displayPreview:function(){
		if(!this.previewModule){throw new Error("App.UI.Preview: invalid widget instance")}
		this.previewModule.inject(this.widget).load()
	},
	////添加到我的页面
	onAddToMyPage:function(B){
		////event.stop()
		B.stop();
		var A=function(){
			if(this.previewModule.dataObj.moduleName.match("MailWizard|SocialWizard")){
				var C=this.previewModule.elm_module.retrieve("widget");
				if(C){this.previewModule=C}
			}
			////添加到MainTable
			this.previewModule.addModuleToPage();
			delete this.previewModule.dataObj.row;
			if(this.archiveId){
				App.Request.newRequest({url:"http://"+NV_HOST+"/ajax/save/userData.php"}).POST({mode:"module.restore",id:this.archiveId,timelineId:this.timelineId})
			}else{App.saveUserData("new",this.previewModule)}
			delete this.previewModule;this.previewModule=null
		}.bind(this);
		////所有module;;App.moduleList.length:module个数| App.moduleList[101].widget.body.baseURI:得到列表上第101个module的url地址
		App.moduleList.push(this.previewModule);
		////是否启动动画特效(从sbox到MainTable)
		if(App.userCustom.enableFx=="1"){
			SqueezeBox.addEvent(
				"onClose",function(D){
					var C=D.getParent();
					new Fx.Morph(C,{duration:"normal",transition:Fx.Transitions.Sine.easeOut})
							.start({opacity:0,top:document.getSize().y/2})
							.addEvent("onComplete",function(E){
								C.setStyles({display:"none",opacity:0.99999});
								A()
							})
				}
			);
			SqueezeBox.setOptions({hideOnClose:false})
		}else{A()}
		SqueezeBox.close(B);
		this.fireEvent("addToMyPage")
	}
});;

//35
App.UI.ConfirmDialog=new Class({
	Implements:[Events,Options],options:{titleText:"",message:"",confirm:{text:_("Yes"),requestText:"",successText:""},discard:{text:_("No"),requestText:"",successText:""},cancelText:_("Cancel"),className:"modal confirmDialog",fx:(App.userCustom.enableFx==1),autoFadeDelay:1500,width:500},initialize:function(A){this.setOptions(A)},show:function(){SqueezeBox.fromElement(this.build(),{handler:"adopt",classWindow:this.options.className,closeWithOverlay:false,fxOverlayDuration:0,fxResizeDuration:0,onOpen:function(){this.fireEvent("onOpen");try{this.confirmButton.focus()}catch(A){}}.bind(this),onClose:function(){this.fireEvent("onClose")}.bind(this),size:{x:this.options.width,y:"auto"}});return this},onConfirm:function(A){this.confirmButton.addClass("action");if(this.discardButton){this.discardButton.addClass("disabled").set("disabled","disabled")}if(this.cancelButton){this.cancelButton.addClass("disabled").set("disabled","disabled")}if(this.options.confirm.requestText!=""){this.confirmButton.value=this.options.confirm.requestText;this.options.discard.successText="";this.ajax=App.Request.newRequest({method:"post",onComplete:this.onDialogComplete.bind(this)});this.fireEvent("onConfirmRequest")}else{this.fireEvent("onConfirm");SqueezeBox.close()}A.stop()},onDiscard:function(A){this.discardButton.addClass("action");this.confirmButton.addClass("disabled").set("disabled","disabled");if(this.cancelButton){this.cancelButton.addClass("disabled").set("disabled","disabled")}if(this.options.discard.requestText!=""){this.discardButton.value=this.options.discard.requestText;this.options.confirm.successText="";this.ajax=App.Request.newRequest({method:"post",onComplete:this.onDialogComplete.bind(this)});this.fireEvent("onDiscardRequest")}else{this.fireEvent("onDiscard");SqueezeBox.close()}A.stop()},onDialogComplete:function(){var A="";A+='<p style="margin-bottom: 1em;">'+(this.options.confirm.successText||this.options.discard.successText)+"</p>";this.body.setHTML(A);this.cancelButton.addClass("nv-primary-button").setProperty("disabled",false).value=_("Close");if(this.confirmButton){this.confirmButton.destroy()}if(this.discardButton){this.discardButton.destroy()}(function(){if(this.options.fx){var B=new Fx.Tween(SqueezeBox.win,"opacity",{duration:1000,onComplete:function(){SqueezeBox.close();SqueezeBox.win.set("opacity",1)}}).start(0)}else{SqueezeBox.close()}}).delay(this.options.autoFadeDelay,this)},build:function(){var B=new Element("div",{"class":"frame"});var A=new Element("h2",{"class":"title",text:this.options.titleText}).inject(B);this.body=new Element("div",{"class":"body",html:this.options.message}).inject(B);var C=new Element("div",{"class":"footer"}).inject(B);this.confirmButton=new Element("input",{type:"button","class":"nv-button nv-primary-button yes",value:this.options.confirm.text,events:{click:this.onConfirm.bindWithEvent(this)}}).inject(C);if(this.options.discard.text){this.discardButton=new Element("input",{type:"button","class":"nv-button no",value:this.options.discard.text,events:{click:this.onDiscard.bindWithEvent(this)}}).inject(C)}if(this.options.cancelText){this.cancelButton=new Element("input",{type:"button","class":"nv-button cancel",value:this.options.cancelText,events:{click:function(){SqueezeBox.close()}}}).inject(C)}return B}});
	
App.UI.ConfirmDialog.DeleteWidget=new Class({
	Extends:App.UI.ConfirmDialog,options:{confirm:{text:_("Delete forever"),requestText:_("Deleting..."),successText:_("The widget has been deleted.")},discard:{text:_("Archive this widget"),requestText:_("Archiving..."),successText:""},width:600},initialize:function(B,A){this.options.titleText=B.dataObj.title;this.options.discard.successText=_("The widget has been archived in your private activity.");this.addEvents({onOpen:function(){B.elm_module.addClass("kbdFocus")},onClose:function(){B.elm_module.removeClass("kbdFocus")},onConfirmRequest:this.onConfirmRequest.bind(this),onDiscardRequest:this.onDiscardRequest.bind(this)});this.module=B;var C="";C+="<p>"+_("Are you sure you want to delete this widget?")+"</p>";C+='<p style="margin-top: 1em;">'+_("You can also archive this widget in your private activity and restore it later.")+"</p>";A.message=C;arguments.callee.parent(A)},onConfirmRequest:function(){if(this.ajax.running){return }this.ajax.setOptions({url:"http://"+NV_HOST+"/ajax/save/userData.php",data:{mode:"close",id:this.module.dataObj.id},onComplete:function(){this.module.remove(false)}.bind(this)});if(App.visit){this.ajax.options.data.visit=App.visit.id}this.ajax.post()},onDiscardRequest:function(){if(this.ajax.running){return }this.ajax.setOptions({url:"http://"+NV_HOST+"/ajax/save/userData.php",data:{mode:"module.archive",id:this.module.dataObj.id},onComplete:function(){this.module.remove(false)}.bind(this)});if(App.visit){this.ajax.options.data.visit=App.visit.id}this.ajax.post()}});
App.UI.ConfirmDialog.SendToPage=new Class({
	Extends:App.UI.ConfirmDialog,options:{titleText:_("You are about to send"),confirm:{text:_("Send"),requestText:_("Sending...")},discard:{text:""},direction:"private"},initialize:function(B,A){if(A.direction=="private"){this.options.confirm.successText=_("The widget has been sent to your private page.")}else{this.options.confirm.successText=_("The widget has been sent to your universe.")}this.module=B;this.addEvent("onOpen",function(){B.elm_module.addClass("kbdFocus")});this.addEvent("onClose",function(){B.elm_module.removeClass("kbdFocus")});this.addEvent("onConfirmRequest",this.onConfirmRequest.bind(this));var C="";C+='<div class="item"><img width="16" height="16" class="icon" src="'+B.ico+'" />'+B.dataObj.title+"</div>";if(A.direction=="private"){C+="<p>"+_("to your private page.")+"</p>"}else{C+="<p>"+_("to your universe. Anyone will be able to access it and add it to their own private or public page.")+"</p>"}A.message=C;arguments.callee.parent(A)},onConfirmRequest:function(){if(this.ajax.running){return }this.ajax.setOptions({url:"http://"+NV_HOST+"/ajax/addToMyPage/add.php",data:{mode:"module.add2page",id:this.module.dataObj.id,direction:this.options.direction}});if(App.visit){this.ajax.options.data.visit=App.visit.id}this.ajax.post()}});
App.UI.ConfirmDialog.ShareWidget=new Class({
	Extends:App.UI.ConfirmDialog,options:{titleText:_("You are about to share"),confirm:{text:_("Share"),requestText:_("Sharing..."),successText:_("The widget has been successfully shared in your public activity.")},discard:{text:""}},initialize:function(B,A){this.addEvent("onOpen",function(){B.elm_module.addClass("kbdFocus")});this.addEvent("onClose",function(){B.elm_module.removeClass("kbdFocus")});this.addEvent("onConfirmRequest",this.onConfirmRequest.bind(this));this.module=B;var C="";C+='<div class="item"><img width="16" height="16" class="icon" src="'+B.ico+'" />'+B.dataObj.title+"</div>";C+="<p>"+_("with your followers. You can cancel it later.")+"</p>";C+='<form class="comment">';C+='<label for="shareWidgetComment" class="comment">'+_("Add a comment: (optional)")+"</label>";C+='<textarea id="shareWidgetComment" name="comment"></textarea>';C+="</form>";A.message=C;arguments.callee.parent(A)},onConfirmRequest:function(){if(this.ajax.running){return }var A=$("shareWidgetComment").value;this.ajax.setOptions({url:"/rest/timeline"}).POST({type:15,status:"private",comment:A,moduleId:this.module.dataObj.id,"data[title]":this.module.dataObj.title.stripTags()})}});
	
App.UI.ConfirmDialog.Starring=new Class({
	Extends:App.UI.ConfirmDialog,options:{titleText:_("You are about to add"),confirm:{text:_("Add"),requestText:_("Adding...")},discard:{text:""},className:"modal confirmDialog starring"},initialize:function(C,A){this.addEvent("onConfirmRequest",this.onConfirmRequest.bind(this));this.data=C;if(!this.data.comment){this.data.comment=""}var B="";B+='<div class="item">';B+='<div class="title">'+this.data.title.stripTags()+"</div>";B+='<div class="url">'+this.data.url.truncate(80)+"</div>";B+="</div>";B+="<form>";if(User.username){B+="<p>"+_("to your:")+"</p>";B+='<div class="privacy">';B+='<input name="visibility" id="visibility-private" type="radio">';B+='<label title="Just you" for="visibility-private" id="visibility-private-label">'+_("Private activity")+"</label>";B+='<input name="visibility" id="visibility-public" type="radio" checked="checked">';B+='<label title="Everyone" for="visibility-public" id="visibility-public-label">'+_("Public activity")+"</label>";B+="</div>"}B+='<label for="shareItemComment" class="comment">'+_("Add a comment: (optional)")+"</label>";B+='<textarea id="shareItemComment" name="comment">'+this.data.comment.stripTags()+"</textarea>";B+="</form>";A.message=B;arguments.callee.parent(A)},onConfirmRequest:function(){if(this.ajax.running){return }var A=$("visibility-public")&&$("visibility-public").checked?"public":"private";var B=$("shareItemComment").value;if(A=="public"){this.options.confirm.successText=_("The item has been successfully added in your public activity.")}else{this.options.confirm.successText=_("The item has been successfully added in your private activity.")}this.ajax.setOptions({url:"/rest/timeline?format=json"}).POST({type:6,status:A,comment:B,"data[title]":this.data.title.stripTags(),"data[url]":this.data.url,"data[fromUserId]":this.data.fromUserId,status:A})}});;

//36
App.UI.FriendsViewer=new Class({
	Implements:[Events,Options],options:{user:"my",display:"list",path:"/rest/account",type:"subscriptions",params:""},initialize:function(A){this.setOptions(A);this.container=new Element("div",{id:"nv-subscriptions"});this.container.adopt(new Element("ul",{"class":"subscriptions"}));if(this.options.type=="search"||this.options.type=="find"){this.options.params="?"+Hash.toQueryString(this.options.params)}else{this.options.path+="/"+(this.options.user||"my")}},inject:function(B){$(B).empty().adopt(this.container);if(this.options.type=="find"){var D=this.container.getElement("p.loading");if(D){D.wait(null,{left:"60%"})}}var A={requestUrl:this.options.path+"/"+this.options.type+this.options.params,responseParams:{},onPageChange:this.onPageChange.bind(this),layout:{availableWidth:this.container.getSize().x,itemWidth:156,numRows:2}};var C={subscriptions:{items:"friends",total:"numFriends"},followers:{items:"followers",total:"numFollowers"},search:{items:"results",total:"numResults"},find:{items:"results",total:"numResults"}};A.responseParams=C[this.options.type];this.multiPage=new Netvibes.UI.MultiPage.JSON(A).hide().inject(this.container);this.container.wait(this.multiPage.ajax,{notEmpty:true});return this},onPageChange:function(H){if(typeof H.error!="undefined"){new Element("p",{"class":"empty"}).setText(H.error).injectBefore(this.container.getElement("ul"));return }var F=H.page.total;var C=H.items;var E={};if(this.options.path.test("my")){E.followers=_("A follower is someone who read your public activity updates.");E.followers+=" "+_("You have no followers yet.");E.subscriptions=_("You did not add anyone to your contacts yet.");E.subscriptions+='<a id="gotoSearchForFriends" href="javascript:void(0)"> '+_("Click here to search for friends who use Netvibes.")+"</a>"}else{E.followers=_("No followers yet");E.subscriptions=_("No friends yet")}if(F>0){var G=$(this.container.getElementsByTagName("ul")[0]).empty();for(var D=0,B=C.length;D<B;D++){G.adopt(this.buildItem(C[D]))}this.multiPage.show()}else{new Element("p",{"class":"empty"}).setHTML(E[this.options.type]||_("No results.")).injectBefore(this.container.getElement("ul"));var A=$("gotoSearchForFriends");if(A){A.onclick=function(){App.Panel.Friends.tabs.selectTab("addFriends");return false}}}},buildItem:function(F){var E=new Element("li",{"class":"subscription"}).store("friendId",F.id);var D=new Element("a",{rel:"friend",href:"http://"+NV_HOST+"/"+F.username}).inject(E);var C=new Element("img",{src:App.getStaticUrl("/img/s.gif"),"class":"photo",styles:{"background-image":"url(http://"+NV_AVATARS+"/"+F.id+"/48)","background-repeat":"no-repeat"}}).inject(D);var A=new Element("span",{"class":"nickname",title:F.displayName}).setText(F.displayName.truncate(20)).inject(D);var G=new Element("em",{"class":"country-name"}).setText(F.country.truncate(13)).inject(D);if(F.isFriend){E.addClass("following")}E.title=F.displayName;E.username=F.username;E.onclick=this.onItemClick.bindWithEvent(this);E.store("data",F);var B={moduleName:"FriendActivities",title:String.format(_("Netvibes - {0}"),F.displayName),data:{userId:F.id,fixedUserId:"true"}};App.Panel.draggableItem(E,B);return E},onItemClick:function(B){var A=Event.findElement(B,"LI");this.fireEvent("onItemClick",A);return false}});;

//37
App.UI.EditStatus=new Class({
	initialize:function(A,B,C){this.displayName=A||"";this.statusText=B||"";this.statusDate=String.parseRelativeTime(C,1)||"";this.container=new Element("div",{"class":"status"});this.buildQuote()},buildQuote:function(){this.container.empty();new Element("p").adopt(new Element("cite").setHTML(this.displayName+"...")).inject(this.container);this.blockquote=new Element("blockquote").adopt(new Element("p").setText((this.statusText=="")?_("Type your status here"):this.statusText)).inject(this.container);this.blockquote.onmouseover=function(){this.addClass("hover");return false};this.blockquote.onmouseout=function(){this.removeClass("hover");return false};var A=new Element("div",{"class":"bottom"}).inject(this.container);if(this.statusText!=""){var C=new Element("span",{"class":"date"}).setText(this.statusDate).inject(A)}else{this.blockquote.addClass("empty");this.blockquote.addEvent("click",this.buildEdit.bind(this))}var B=new Element("input",{type:"button","class":"nv-button nv-primary-button",styles:{display:"inline"},value:_("Update your status")}).inject(A);B.addEvent("click",this.buildEdit.bind(this));if(this.statusText!=""){var D=new Element("input",{type:"button","class":"nv-button",styles:{display:"inline"},value:_("Reset")}).inject(A);D.addEvent("click",this.onResetting.bind(this))}},buildEdit:function(){this.container.empty();new Element("p").adopt(new Element("cite").setHTML(this.displayName+"...")).inject(this.container);var A=new Element("textarea",{col:70,rows:3}).setText(this.statusText).inject(this.container);new Countable(A,150);var B=new Element("div",{"class":"bottom"}).inject(this.container);var C=new Element("input",{type:"button","class":"nv-button nv-primary-button",styles:{display:"inline"},value:_("Save")}).inject(B);var D=new Element("input",{type:"button","class":"nv-button",styles:{display:"inline"},value:_("Cancel")}).inject(B);C.addEvent("click",this.onUpdating.bind(this));D.addEvent("click",this.buildQuote.bind(this));A.addEvent("keydown",this.onUpdating.bind(this))},onResetting:function(C){C.target.disabled=true;var A=new Request.JSON({secure:false,onComplete:this.onResetted.bind(this)}).post("/rest/timeline",{type:1,reset:1});var B=$("userProfile").getParent("li");B.$attributes.myText=_("Your personal information and status")},onResetted:function(){this.statusText="";this.buildQuote()},onUpdating:function(D){if(D.type=="keydown"&&D.code!=Event.Keys.enter){return true}D.target.disabled=true;var A=$(this.container.getElementsByTagName("textarea")[0]).get("value");if(A.trim()==""||A.trim()==this.statusText.trim()){return false}this.statusText=A.stripTags();var B=new Request.JSON({secure:false,onComplete:this.onUpdated.bind(this)}).post("/rest/timeline",{type:1,data:A});var C=$("userProfile").getParent("li");C.$attributes.myText=A;return false},onUpdated:function(A){this.statusDate=String.parseRelativeTime(A.date,1)||"";this.buildQuote()},inject:function(A){$(A).adopt(this.container);return this}});;

//38
App.UI.Profile=new Class({
	Implements:[Events,Options],options:{enableBack:true,redirectUniverse:false},initialize:function(B,A){this.setOptions(A);this.container=B;this.options.redirectUniverse=(App.visit&&App.visit.id&&!App.visit.my)},show:function(A,B){this.profileId=A;if(this.profileId=="my"||this.options.redirectUniverse){this.options.enableBack=false}App.Panel.element.hide();this.container.show();this.profile=new Element("div",{"class":"profile"}).inject(this.container).wait();App.UI.Profile.request=new Request({onComplete:function(C){if(typeof B=="function"){B()}this.build(C)}.bind(this)}).get("/rest/account/"+A+"/profile",{format:"json"})},build:function(K){delete App.UI.Profile.request;App.UI.Profile.request=null;var N=JSON.decode(K);if(!N||!N.success){this.container.innerHTML="<p>This profile can not be displayed. Please try again later.<p>";return false}var J="";var G="http://"+NV_AVATARS+"/"+N.profile.id+"/64";J+='<div class="vcard">';if(this.options.enableBack){J+='<a class="profileBack" rel="back" href="javascript:void(0)"><span>'+_("Back")+"</span></a>"}J+='<p><img src="'+G+'" width="64" height="64" alt="" class="photo" /></p>';J+='<h2 class="fn nickname">'+N.profile.displayName+"</h2>";var B=(N.profile.status&&N.profile.status.text)||"";if(B.length&&this.profileId!="my"){J+='<p class="status"><em title="'+String.parseRelativeTime(N.profile.status.date,1)+'">'+B+"</em></p>"}var D="http://"+NV_HOST+"/";J+='<table class="profile" cellspacing="0" cellpadding="0">';if(N.profile.username){D="http://"+NV_HOST+"/"+N.profile.username;J+="<tr><th>"+_("Universe:")+'</th><td><a href="'+D+'" rel="universe" class="fn url">netvibes.com/'+N.profile.username+"</a></td>"}if(!N.brand){if(N.profile.birthday){J+="<tr><th>"+_("Birthday:")+'</th><td class="bday">'+N.profile.birthday+"</td></tr>"}J+="<tr><th>"+_("Sex:")+"</th><td>"+((N.profile.gender=="female")?_("Female"):_("Male"))+"</td></tr>";J+="<tr><th>"+_("Location:")+'</th><td><span class="locality">'+N.profile.location+"</span></td></tr>"}J+="</table>";J+="<p>";if(N.myProfile){J+='<a href="/account/profile" class="nv-button">'+_("Edit my profile")+"</a>"}else{if(App.registeredUser){if(N.isFriend){J+='<a href="javascript:void(0)" class="removeFriendButton nv-button">'+_("Remove friend")+"</a>"}else{J+='<a href="javascript:void(0)" class="addFriendButton nv-button">'+_("Add friend")+"</a>"}}}var I="http://www2.netvibes.com/rest/account/"+N.profile.username+"/timeline?format=atom";J+='<span id="profileFeed" class="widget feed"><img class="icon" src="/img/feed.png"><a class="title" href="'+I+'">'+_("Feed")+"</a></span>";J+="</p>";J+="</div>";this.profile.setHTML(J).inject(this.container);this.profileViewer=new Element("div",{"class":"profileViewer"}).inject(this.profile);if(this.profileId!="my"){new Element("h2").set({html:_("About ")+N.profile.displayName}).inject(this.profileViewer)}$("profileFeed").store("dataObj",{moduleName:"RssReader",title:N.profile.displayName,data:{feedUrl:I}}).store("richIcon","http://eco.netvibes.com/img/thumbnail/ginger/nopreview-64-48.png.feed.png");App.Panel.AddContent.attachWidgetEvents();this.fireEvent("onShow");if(this.profileId!="my"){this.tabView=new Netvibes.UI.TabView({classTabList:"categoryList",classTabContent:"categoryContent"});$(this.tabView.addTab("activities",{text:_("Activities")})).addClass("category");if(N.isFriend){$(this.tabView.addTab("friends",{text:""})).addClass("category").getFirst().setHTML(_("Friends")+" <em>"+N.numFriends+"</em>")}if(this.profileId!="netvibes"&&this.profileId!="38015702"){$(this.tabView.addTab("followers",{text:""})).addClass("category").getFirst().setHTML(_("Followers")+" <em>"+N.numFollowers+"</em>")}this.tabView.observe("activeTabChange",this.onActiveTabChanged.bind(this));this.tabView.appendTo(this.profileViewer);this.onActiveTabChanged("activities")}else{var C=new Element("div",{"class":"tabContent"}).inject(this.profile);var M=new Element("h2").setText(_("Update your status")).inject(C);var E=new App.UI.EditStatus(N.profile.displayName,B,N.profile.status.date).inject(C)}var F=this.profile.getElementsByClassName("photo")[0];if(F){var A={moduleName:"FriendActivities",title:String.format(_("Netvibes - {0}"),N.profile.displayName),data:{userId:N.profile.id,fixedUserId:"true",selfMode:this.profileId!="my"?false:true,activeTab:"UserFriendTimeline"}};App.Panel.draggableItem(F,A)}var O=this.profile.getElementsByClassName("profileBack")[0];if(O){O.addEvent("click",function(){this.fireEvent("onBack")}.bind(this))}var H=this.profile.getElementsByClassName("removeFriendButton")[0];if(H){H.onclick=this.onFriendRemoving.bindWithEvent(this)}var L=this.profile.getElementsByClassName("addFriendButton")[0];if(L){L.onclick=this.onFriendAdding.bindWithEvent(this)}},onActiveTabChanged:function(C,E){var B=$(this.tabView.getTabContent(C));if(B.retrieve("loaded")){return }var A=this;B.empty();switch(C){case"friends":var F=new App.UI.FriendsViewer({user:this.profileId,type:"subscriptions"}).inject(B);F.addEvent("onItemClick",function(G){if(A.options.redirectUniverse){window.location.href="http://"+NV_HOST+"/"+G.username}else{if(G.hasClass("loading")){return false}var H=G.addClass("loading").retrieve("friendId");App.Panel.showProfile(H);return false}});break;case"followers":var F=new App.UI.FriendsViewer({user:this.profileId,type:"followers"}).inject(B);F.addEvent("onItemClick",function(G){if(A.options.redirectUniverse){window.location.href="http://"+NV_HOST+"/"+G.username}else{if(G.hasClass("loading")){return false}var H=G.addClass("loading").retrieve("friendId");App.Panel.showProfile(H);return false}});break;case"activities":default:var D=new Netvibes.UI.Timeline({id:"profileTimeline",search:"user:"+this.profileId});D.getElement().inject(B);break}if(!Browser.isIE){B.store("loaded",true)}},onFriendRemoving:function(C){var B=new Event(C);this.removeButton=B.target;if(this.removeButton.hasClass("removing")){return false}if(window.confirm(_("Remove friend from contacts?"))){this.removeButton.addClass("removing");var A=new Request.JSON({secure:false,headers:{"X-Requested-Method":"delete"},onComplete:this.onFriendRemoved.bind(this)}).post("/rest/account/my/subscriptions/"+this.profileId)}},onFriendRemoved:function(B){var A=new Element("span",{"class":B.success?"ajaxSuccess":"ajaxError"}).setText(B.success?_("Removed"):_("Error")).injectAfter(this.removeButton);this.removeButton.remove();if(B.success&&User.numFriends){User.numFriends=B.numFriends}this.fireEvent("onRemove",this.profileId)},onFriendAdding:function(C){var B=new Event(C);this.addButton=B.target;if(this.addButton.hasClass("removing")){return false}this.addButton.addClass("removing");var A=new Request.JSON({secure:false,headers:{"X-Requested-Method":"put"},onComplete:this.onFriendAdded.bind(this)}).post("/rest/account/my/subscriptions/"+this.profileId)},onFriendAdded:function(B){var A=new Element("span",{"class":B.success?"ajaxSuccess":"ajaxError"}).setText(B.success?_("Added"):_("Error")).injectAfter(this.addButton);this.addButton.remove();if(B.success&&User.numFriends){User.numFriends=B.numFriends}this.fireEvent("onAdd",this.profileId)}});;

//39
App.Wizard=new Class({
	Implements:[Events,Options],
	options:{
		duration:200,
		nextStepButtonText:_("Next"),
		prevStepButtonText:"< "+_("Previous"),
		cancelButtonText:_("Cancel"),
		finishButtonText:_("Finish"),
		title:"",
		formAction:""},
	initialize:function(A,B){
		this.setOptions(B);this.steps=A;this.trail=[];this.length=this.steps.length;this.currentStep=0;this.data={};this.build()
	},
	build:function(){
		this.overlay=new Overlay({hideOnClick:false}).show();
		this.container=new Element("form",{id:"wizard",method:"post",action:this.options.formAction}).setStyle("visibility","hidden").inject("application","top");
		new Element("h1",{id:"wizard-title"}).set("html",this.options.title).inject(this.container,"top");
		Netvibes.UI.createIcon("actions-window-close close",_("Close"),16,16).addEvent("click",this.close.bind(this)).inject(this.container);
		var B=new Element("ul",{"class":"autoclear",styles:{margin:0,padding:0}}).inject(this.container);
		for(var C=0;C<this.length;C++){
			var A=new Element("li",{"class":"wizard-step",styles:{width:(this.length<=2)?350:Math.floor(95/this.length)+"%"}});
			this.trail[C]={};
			this.trail[C].head=new Element("a",{"class":"wizard-head",id:"wizard-head-"+C}).set("html","<strong>"+(C+1)+"</strong><div>"+this.steps[C].title+"</div>").addEvents({click:this.displayPreviousStep.bindWithEvent(this,C),mouseover:function(F,E){if(E<this.currentStep){F.target.style.cursor="pointer"}}.bindWithEvent(this,C),mouseout:function(F,E){F.target.style.cursor="default"}.bindWithEvent(this,C)}).inject(A);
			if(C==this.currentStep){this.trail[C].head.addClass("wizard-active")}
			this.trail[C].balloonContent=new Element("div",{"class":"in1"});
			this.trail[C].balloon=new Element("div",{"class":"wizard-balloon",id:"wizard-balloon-"+C,styles:{visibility:C==this.currentStep?"visible":"hidden"}}).grab(this.trail[C].balloonContent).inject(A);
			this.trail[C].step=new this.steps[C].content(this);
			this.setBalloon(C);A.inject(B)
		}
		if(App.userCustom.enableFx=="1"){
			var D=new Fx.Morph(this.container,{duration:this.options.duration,wait:false});
			D.start({opacity:[0,1]}).chain(function(){this.fireEvent("load")}.bind(this))
		}else{this.container.style.visibility="visible";this.fireEvent("load")}},
	setBalloon:function(A){
		this.trail[A].balloonContent.empty().adopt(this.trail[A].step.toElement());
		var C=new Element("a",{href:"javascript:void(0)",styles:{display:"block","float":"left"}});
		var B=new Element("a",{href:"javascript:void(0)",styles:{display:"block","float":"right"}});
		if(A==0){C.setText(this.options.cancelButtonText);C.addEvent("click",this.close.bindWithEvent(this))}else{
			C.grab(new Element("span",{text:this.options.prevStepButtonText}));C.set({rel:"prev"}).addEvent("click",this.prevStep.bindWithEvent(this))
		}
		if(A==this.length-1){
			B.grab(new Element("span",{text:this.options.finishButtonText}));
			B.set({"class":"wizard-button",id:"wizard-finish"}).addEvent("click",this.onFinish.bindWithEvent(this))
		}else{
			B.grab(new Element("span",{text:this.options.nextStepButtonText}));
			B.set({rel:"next","class":"wizard-button"}).addEvent("click",this.nextStep.bindWithEvent(this))
		}
		var D=new Element("div",{"class":"wizard-balloon-footer autoclear"}).grab(C).grab(B);
		D.inject(this.trail[A].balloonContent)
	},
	close:function(A){if(A){A.stop();this.overlay.hide()}this.container.destroy()},
	positionBalloon:function(C){
		var B=this.trail[C].balloon.getSize().x;var A=this.trail[C].head.getSize().x;if(B>A){this.trail[C].balloon.style.marginLeft="-"+(B-A)/2+"px"}},
	nextStep:function(A){
		if(A){A.stop()}
		if(A&&this.trail[this.currentStep].step.onNextStep){if(!this.trail[this.currentStep].step.onNextStep()){return false}}
		if(this.currentStep!=this.length){this.goToStep(this.currentStep+1)}},
	prevStep:function(A){
		if(A){A.stop()}
		if(this.trail[this.currentStep].step.onPrevStep){if(!this.trail[this.currentStep].step.onPrevStep()){return false}}
		if(this.currentStep!=0){this.goToStep(this.currentStep-1)}},
	goToStep:function(A){
		if(A<0||A>=this.length){return }
		this.trail[this.currentStep].balloon.style.visibility="hidden";
		this.trail[this.currentStep].head.removeClass("wizard-active");
		if(this.trail[this.currentStep-1]){this.trail[this.currentStep-1].head.removeClass("wizard-previous")}
		this.currentStep=A;
		this.positionBalloon(A);
		this.trail[this.currentStep].balloon.style.visibility="visible";
		this.trail[this.currentStep].head.addClass("wizard-active");
		if(this.trail[this.currentStep-1]){this.trail[this.currentStep-1].head.addClass("wizard-previous")}
		if(typeof this.trail[this.currentStep].step.onShow=="function"){this.trail[this.currentStep].step.onShow()}
	},
	displayPreviousStep:function(B,A){if(B){B.stop()}if(A>=this.currentStep){return }this.goToStep(A)},
	getNextButton:function(){return this.trail[this.currentStep].balloon.getElement("a.wizard-button")},
	onFinish:function(A){this.trail[this.currentStep].step.onFinish()}
});
App.wizardCustomEnabled=function(){if(!App.visit&&(App.locale=="fr"||App.locale=="us")){return true}else{return false}};
App.Wizard.Custom={};
App.Wizard.Custom.Country=new Class({
	initialize:function(A){this.wizard=A},toElement:function(){this.content=new Element("div");var B='<h2 style="white-space: nowrap">'+_("Where are you?")+"</h2>";B+='<p class="field" style="margin: 10px 0 5px 0">';B+='<label for="wizard-hometown">'+_("City:")+"</label>";B+='<input type="text" class="text wizard-hometown defaultText" value="" id="wizard-hometown" />';B+='<div id="wizard-hometown-results" class="wizard-hometown-results inner" style="display: none"></div>';B+="</p>";B+='<p class="field" style="margin: 10px 0 5px 0">';B+='<label for="wizard-country-select">'+_("Local content:")+"</label>";B+='<select id="wizard-country-select">';var A=Netvibes.Settings.locales.sort(function(D,C){var E=D.name.replace(/é|è|ê|ë|ê/gi,"e").replace(/à|â|ä/gi,"a").replace(/î|ï/gi,"i").replace(/ù|ü|û/gi,"u").replace(/ô|ö/gi,"o").toLowerCase();var F=C.name.replace(/è|é|ê|ë|ê/gi,"e").replace(/à|â|ä/gi,"a").replace(/î|ï/gi,"i").replace(/ù|ü|û/gi,"u").replace(/ô|ö/gi,"o").toLowerCase();if(E<F){return -1}if(E>F){return 1}return 0});A.each(function(C){B+='<option value="'+C.code+'"';if(C.code==App.locale){B+=' selected="selected"'}B+=">"+C.name+"</option>"});B+="</select>";B+="<br />";B+="</p>";B+='<input type="checkbox" id="wizard-country-save" checked="checked" style="display: none" /><label for="wizard-country-save">'+_("Your netvibes will be localized for this region")+"</label>";this.content.set("html",B);this.attachEvents();return this.content},attachEvents:function(){App.report("wizard.step1",{locale:App.locale});this.input=$(this.content.getElementsByClassName("wizard-hometown")[0]);this.resultDiv=$(this.content.getElementsByClassName("wizard-hometown-results")[0]);this.wizard.addEvent("load",function(){this.input.focus()}.bind(this));this.input.addEvents({keyup:this.updateHometown.bind(this)})},updateHometown:function(B){if(this.input.value.trim()==""){this.resultDiv.hide();return true}if(arguments.callee.timer){clearTimeout(arguments.callee.timer)}if(typeof B=="object"){B.stop();if(B.type=="keyup"&&B.key=="enter"){arguments.callee.queue=arguments.callee.queue||0;if(arguments.callee.queue>0){return }++arguments.callee.queue;setTimeout(function(){this.queue=0}.bind(arguments.callee),1000)}else{if(B.type=="keyup"){var A=arguments.callee.bind(this);arguments.callee.timer=setTimeout(A,1000);return }}}var C=new Hash({name:this.input.value,maxRows:10,type:"json",featureClass:"P",lang:App.lang.substring(0,2)});new Request.JSON({onComplete:this.displayResultList.bind(this),onRequest:function(){this.resultDiv.show();this.resultDiv.set("text",_("Loading..."))}.bind(this),onFailure:function(){this.resultDiv.set("html",'<span class="error">'+_("service unavailable")+"</span>")}.bind(this)}).get("/proxy/ajaxProxy.php",{url:"http://ws.geonames.org/search?"+C.toQueryString(),cache:60*60*24*30})},displayResultList:function(B){if(!B){return }var D=B.geonames;var C=D.length;this.resultDiv.empty();if(C==0){this.resultDiv.empty();this.resultDiv.set("text",_("No result"));this.setHometown(false)}else{var A=document.createElement("ul");for(var E=0;E<C;E++){new Element("li",{"class":E%2==0?"odd":"even"}).grab(new Element("a",{href:"javascript:void(0)"}).addEvent("click",this.setHometown.bind(this,D[E])).set("html",D[E].name+" ("+(D[E].adminName1||D[E].adminCode1)+", "+D[E].countryName+")")).inject(A)}this.resultDiv.innerHTML="";this.resultDiv.appendChild(A);this.resultDiv.style.display="block"}},setHometown:function(A){if(!A){delete this.wizard.data.location}else{this.wizard.data.location={};this.wizard.data.location.id=A.geonameId;this.wizard.data.location.name=A.name;this.wizard.data.location.countryName=A.countryName;this.wizard.data.location.countryCode=A.countryCode;this.input.value=A.name+" ("+(A.adminName1||A.adminCode1)+", "+A.countryName+")";this.synchToLocalContent(A.countryCode)}this.resultDiv.empty();this.resultDiv.hide()},synchToLocalContent:function(E){var F=E.toLowerCase();var A=$("wizard-country-select");var C=A.getElementsByTagName("option");for(var D=0;D<C.length;D++){if(C[D].value.substring(0,2)==F){A.selectedIndex=D;return }if(C[D].value.substring(0,2)=="us"){var B=D}}A.selectedIndex=B},onNextStep:function(){if(this.input.value.trim()==""){this.resultDiv.set("html",'<span class="error">'+_("Please indicate your city")+"</span>");this.resultDiv.show();return false}var A=$("wizard-country-select").value;if($("wizard-country-save").checked&&A!=App.locale){this.wizard.data.locale=A}else{delete this.wizard.data.locale}this.wizard.trail[2].step.populate(A);this.wizard.trail[3].step.populate(A);App.report("wizard.step2",{locale:A||App.locale});return true}});
	
App.Wizard.Custom.Interest=new Class({
	initialize:function(A){this.wizard=A;this.categs=new Hash({news:{name:_("News"),id:1},business:{name:_("Business"),id:2},life:{name:_("Fashion"),id:8},techno:{name:_("High-Tech"),id:6},art:{name:_("Art & Entertainment"),id:5},sport:{name:_("Sports"),id:3},games:{name:_("Games"),id:7}})},toElement:function(){this.content=new Element("div",{"class":"minWidth"});var B="<h2>"+_("Interests")+"</h2>";B+="<p><strong>"+_("What do you like on your own?")+"</strong></p>";B+='<ul class="autoclear wizard-thumbs" id="wizard-categ">';var A=0;this.categs.each(function(C,D){B+='<li class="picto-'+D+'"><a href="javascript:void(0)"><div class="vignette"></div><input type="checkbox" class="checkbox" id="'+D+'-id" name="'+D+'"';if(A==0){B+=' checked="checked" ';A++}B+="/>";B+="<label>"+C.name+"</label></a>";B+="</li>"});B+='<li id="dla-keyword">';B+="<p>"+_("Free keywords:")+"</p>";B+="<p>("+_("travel, music, games ...")+")</p><br />";B+='<div><input type="checkbox" id="wizard-dla-chk" name="dla" /><input type="text" id="wizard-dla" style="color: #666" class="text dla-keyword-input" name="dla-keyword" value="'+_("keyword")+'" /></div>';B+="</li>";B+="</ul>";B+="<p>";B+=_("Netvibes recommends the most popular widget for each category");B+="</p>";this.content.set("html",B);this.attachEvents();return this.content},attachEvents:function(){var A=this.content.getElementsByTagName("ul")[0];$A(A.getElementsByTagName("a")).each(function(B){$(B).addEvent("click",function(D){var C=this.getElementsByTagName("input")[0];if(C.name!="dla"&&!D.target.type){C.checked=!C.checked}})});$(this.content.getElementsByClassName("dla-keyword-input")[0]).addEvents({blur:function(){if(this.value.trim()==""){this.value=_("keyword");this.style.color="#666"}else{this.parentNode.firstChild.checked=true}},focus:function(){if(this.value.trim()==_("keyword")){this.value="";this.style.color="#000"}}})},onNextStep:function(){this.computeState();App.report("wizard.step3",{locale:this.wizard.data.locale||App.locale});return true},computeState:function(){var A=$A($("wizard-categ").getElementsByClassName("checkbox"));this.wizard.data.interest={};this.wizard.data.interest.category=[];A.each(function(B){if(B.checked){this.wizard.data.interest.category.push(this.categs[B.name].id)}}.bind(this));delete this.wizard.data.keyword;if($("wizard-dla-chk").checked){this.wizard.data.keyword=$("wizard-dla").value}},populate:function(A){var C=new Hash({query:"",flag:1024,sort:"popular",region:A,type:"widget",format:"json",thumbheight:48,thumbwidth:64,thumbtype:"ginger",customsort:"type_native,pick,featured,popular",limit:9,rawquery:""});if(this.wizard.data.interest.category.length>0){for(var B=0;B<this.wizard.data.interest.category.length;B++){C.rawquery+="categories:"+this.wizard.data.interest.category[B];if(B!=this.wizard.data.interest.category.length-1){C.rawquery+=" OR "}}}else{delete this.wizard.data.interest;$("wizard-finish").hide();$("wizard-terminal").set("html",_("Creating your page...")).show();this.wizard.trail[3].step.postData();return }new Request.JSON({onComplete:function(D){if(D.items.length>0&&this.wizard.data.interest.category.length>0){this.wizard.data.interest.widget=D.items}else{delete this.wizard.data.interest}this.wizard.trail[3].step.postData()}.bind(this),onRequest:function(){$("wizard-finish").hide();$("wizard-terminal").set("html",_("Creating your page...")).show()}.bind(this),onFailure:function(){$("wizard-terminal").set("html",'<span class="error">'+_("Sorry, an error has occurred. Try again later.")+"</span>")}.bind(this)}).get("/proxy/ajaxProxy.php",{url:"http://api.eco.netvibes.com/search/?"+C.toQueryString()})}});
App.Wizard.Custom.SocialThings=new Class({
	initialize:function(A){this.wizard=A},
	toElement:function(){
		this.content=new Element("div",{"class":"minWidth"});
		var A="<h2>"+_("Communication")+"</h2>";
		A+="<p><strong>"+_("What services are you using?")+"</strong></p>";
		A+='<ul class="autoclear wizard-thumbs" id="wizard-social">';
		A+="<li>"+_("Loading...")+"</li>";
		A+="</ul>";
		A+="<p>";
		A+=_("Netvibes gives you the ability to be notified of new emails and follow the activities from your social networks.");
		A+="</p>";
		this.content.set("html",A);
		return this.content
	},
	populate:function(A){
		var B=new Hash({query:"",flag:2048,sort:"popular",region:A,type:"widget",format:"json",thumbheight:48,thumbwidth:64,thumbtype:"ginger",customsort:"type_native,pick,featured,popular"});
		new Request.JSON({onComplete:function(D){this.items=D.items.slice(0,6);var C=$(this.content.getElementsByTagName("ul")[0]);C.empty();this.items.each(function(F,E){if(typeof F=="undefined"){return }new Element("li").grab(new Element("a",{href:"javascript:void(0)"}).addEvent("click",function(H){if(!H.target.type){var G=this.getElementsByTagName("input")[0];G.checked=!G.checked}}).set("html",'<div class="vignette" style="background: url('+F.thumbnail+') left top no-repeat"></div><input type="checkbox" id="'+F.id+'-id" class="checkbox" name="'+F.id+'"/><label>'+F.title+"</label>")).inject(C)}.bind(this))}.bind(this),onRequest:function(){$(this.content.getElementsByTagName("ul")[0]).empty().set("html",_("Loading..."))}.bind(this),onFailure:function(){}.bind(this)}).get("/proxy/ajaxProxy.php",{url:"http://api.eco.netvibes.com/search/?"+B.toQueryString()})
	},
	onNextStep:function(){
		this.wizard.data.social=[];
		$A(this.content.getElementsByTagName("input")).each(function(A,B){if(A.checked){this.wizard.data.social.push(this.items[B])}}.bind(this));
		if(this.wizard.data.social.length==0){delete this.wizard.data.social}
		App.report("wizard.step4",{locale:this.wizard.data.locale||App.locale});return true}});
	
App.Wizard.Custom.CustomFinish=new Class({
	initialize:function(A){this.wizard=A},
	toElement:function(){
		this.content=new Element("div",{"class":"minWidth"});var A="<h2>"+_("Your page is ready")+"</h2>";A+="<p>";A+=_("Congratulations! Your personalized startpage is ready! At any time you can add cool new widgets, remove ones you don't want, and update the layout exactly the way you want it.");A+="</p>";this.sponsoredElm=new Element("div");this.content.set("html",A);this.sponsoredElm.inject(this.content);new Element("div",{id:"wizard-terminal","class":"autoclear",styles:{textAlign:"center",paddingTop:"10px",marginTop:"10px",display:"none"}}).inject(this.content);return this.content
	},
	populate:function(A){
		this.code=A;var B=new Hash({query:"",resource:"assistant",section:"default",sort:"popular",region:A,type:"widget",format:"json",thumbheight:48,thumbwidth:64,thumbtype:"ginger",type:"widget",customsort:"type_native,pick,featured,popular"});new Request.JSON({onComplete:function(D){if(!D||D.items.length==0){this.sponsoredElm.empty();return }this.items=D.items.slice(0,3);this.sponsoredElm.empty();var C=new Element("ul",{id:"wizard-sponsored","class":"autoclear wizard-thumbs"});this.sponsoredElm.grab(new Element("div",{"class":"inner"}).adopt(new Element("p",{html:_("Suggested partner widgets to add to your page:")}),C));this.items.each(function(E){if(typeof E=="undefined"){return }new Element("li").grab(new Element("a",{href:"javascript:void(0)"}).addEvent("click",function(G){if(!G.target.type){var F=this.getElementsByTagName("input")[0];F.checked=!F.checked}}).set("html",'<div class="vignette" style="background: url('+E.thumbnail+') left top no-repeat"></div><input type="checkbox" class="checkbox" id="'+E.id+'-id" name="'+E.id+'" checked="checked" /><label>'+E.title+"</label>")).inject(C)}.bind(this))}.bind(this),onRequest:function(){this.sponsoredElm.empty().set("html",_("Loading..."))}.bind(this),onFailure:function(){}.bind(this)}).get("/proxy/ajaxProxy.php",{url:"http://api.eco.netvibes.com/sponsored/?"+B.toQueryString()})
	},
	onFinish:function(){
		this.wizard.data.sponsored=[];var A={};$A(this.content.getElementsByTagName("input")).each(function(B,C){A[this.items[C].id]=B.checked;if(B.checked){this.wizard.data.sponsored.push(this.items[C])}}.bind(this));if(A.length>0){App.report("wizard.thumbs",A)}if(this.wizard.data.sponsored.length==0){delete this.wizard.data.sponsored}if(this.wizard.data.sponsored){this.wizard.data.sponsored.each(function(B){App.report("adc.spon.install",{ecoId:B.id,browser:Browser.name,browser_version:Browser.version,os:Browser.os,os_version:Browser.osVersion,screensize:screen.width+"x"+screen.height,locale:User.locale||App.locale,wizard:true});new Request().get("/proxy/ajaxProxy.php",{url:"http://api.eco.netvibes.com/pingcampaign/"+B.id})})}this.wizard.trail[1].step.populate(this.code)
	},
	postData:function(){
		if(typeof this.wizard.data.location=="undefined"){this.wizard.data.location={};this.wizard.data.location.name=$("wizard-hometown").value}
		var A=function(C){
			var B=_("Sorry, an error has occurred. Try again later.");if(typeof C=="string"){B=C}$("wizard-terminal").set("html",'<span class="error">'+B+"</span>");$("wizard-finish").show()
		};
		new Request.JSON({onComplete:function(B){if(B&&B.success){App.userCustom.announcement.push(100);App.saveUserCustomNow();setTimeout(function(){document.location.reload()},500)}else{if(B==""||(B&&B.error)){A(B.error)}}},onFailure:A}).post("/ajax/tab/custom.php",JSON.encode(this.wizard.data))
	}
});
////欢迎来到你的个性化页面!,Start...
App.showWizardCustom=function(){
	App.Panel.close();
	return new App.Wizard(
		[{title:_("Where are you?"),content:App.Wizard.Custom.Country},
		 {title:_("Interests"),content:App.Wizard.Custom.Interest},
		 {title:_("Communication"),content:App.Wizard.Custom.SocialThings},
		 {title:_("Your page is ready"),content:App.Wizard.Custom.CustomFinish}],
		{title:_("Personalize your page"),finishButtonText:_("Show me my page")}
	)
};
App.Wizard.Register={};
App.Wizard.Register.EmailPasswordStep=new Class({
	Extends:App.Login.Register,initialize:function(A){this.wizard=A},onNextStep:function(){if(this.validate()){var A=this.wizard.getNextButton();A.addClass("wizard-button-disabled");A.getFirst().set("text",_("Loading..."));if(!(this.request&&this.request.running)){this.request=new Request({url:"/ajax/user/checkEmail.php",onComplete:this.onVerifyEmail.bind(this)}).post({email:this.inputEmail.value})}}else{this.errorMsg.show().innerHTML=_("Please correct the errors below")}return false},onVerifyEmail:function(B){var A=this.wizard.getNextButton();A.removeClass("wizard-button-disabled");A.getFirst().set("text",this.wizard.options.nextStepButtonText);if(B=="inuse"){this.onRegistered(B)}else{this.errorMsg.hide();this.wizard.nextStep();this.request=null}}});
	
App.Wizard.Register.VerifyEmailStep=new Class({
	initialize:function(A){this.wizard=A},toElement:function(){var A=new Element("div");var B="";B+="<h2>"+_("Confirm your e-mail address")+"</h2>";B+='<p class="error" style="display:none"></p>';B+='<p class="field">';B+='<label for="updateEmail">'+_("Email:")+"</label>";B+='<input id="updateEmail" name="updateEmail" type="text" class="text email" value="'+(User.email||"")+'" /><img src="'+App.getStaticUrl("/img/s.gif")+'" width="16" height="16" />';B+='<em class="description">'+_("You will be sent a confirmation e-mail.")+" "+_("This message will contain an information link to activate your public page.")+"</em>";B+="</p>";A.set("html",B);this.attachEvents(A);return A},attachEvents:function(A){this.errorMsg=A.getElement(".error");this.inputEmail=A.getElement(".email");this.inputEmail.addEvent("change",this.validateEmail.bindWithEvent(this))},validateEmail:function(B){var A=String.isEmail(this.inputEmail.value);if(this.inputEmail.value.length||!B){this.inputEmail.getNext().className=A?"valid":"invalid"}return A},onNextStep:function(){if(this.validateEmail()&&!(this.request&&this.request.running)){var A=this.wizard.getNextButton();A.addClass("wizard-button-disabled");A.getFirst().set("text",_("Loading..."));this.request=new Request({url:"/ajax/user/checkEmail.php",onComplete:this.onVerifyEmail.bind(this)}).post({email:this.inputEmail.value})}return false},onVerifyEmail:function(B){var A=this.wizard.getNextButton();A.removeClass("wizard-button-disabled");A.getFirst().set("text",this.wizard.options.nextStepButtonText);if(B=="inuse"){this.errorMsg.show().innerHTML=_("Sorry, this email address is already in use");this.inputEmail.getNext().className="invalid";this.inputEmail.yellowFade()}else{this.errorMsg.hide();this.wizard.nextStep();this.request=null}}});
	
App.Wizard.Register.ProfileStep=new Class({
	initialize:function(A){this.wizard=A},toElement:function(){this.content=new Element("div");var A="";A+='<p class="field">';A+='<label for="signupFullname">'+_("What's your full name?")+"</label>";A+='<input id="signupFullname" name="fullname" type="text" class="text" value="" autocomplete="off" /><img src="'+App.getStaticUrl("/img/s.gif")+'" width="16" height="16" />';A+='<em class="description">'+_("ex: John Smith")+"</em>";A+="</p>";A+='<p class="field">';A+="<label>"+_("Gender:")+"</label>";A+='<select name="gender">';A+='<option value="male">'+_("Male")+"";A+='<option value="female">'+_("Female")+"";A+="</select>";A+="</p>";A+='<p class="field">';A+="<label>"+_("What's your age?")+"</label>";A+='<select id="birthdayMonth" name="month">';A+="<option>"+_("Month:")+"</option>";A+='<option value="1">'+_("January")+"</option>";A+='<option value="2">'+_("February")+"</option>";A+='<option value="3">'+_("March")+"</option>";A+='<option value="4">'+_("April")+"</option>";A+='<option value="5">'+_("May")+"</option>";A+='<option value="6">'+_("June")+"</option>";A+='<option value="7">'+_("July")+"</option>";A+='<option value="8">'+_("August")+"</option>";A+='<option value="9">'+_("September")+"</option>";A+='<option value="10">'+_("October")+"</option>";A+='<option value="11">'+_("November")+"</option>";A+='<option value="12">'+_("December")+"</option>";A+="</select> ";A+='<select id="birthdayDay" name="day"></select> ';A+='<select id="birthdayYear" name="year">';A+="<option>"+_("Year:")+"</option>";for(var B=2008;B>=1910;B--){A+='<option value="'+B+'">'+B+"</option>"}A+='</select><img src="'+App.getStaticUrl("/img/s.gif")+'" width="16" height="16" />';A+="</p>";A+='<p class="error" style="display:none"></p>';A+="<p>";A+='<input id="birthdayVisibility" name="birthdayVisibility" type="checkbox" value="0" /><label for="birthdayVisibility">'+_("Don't display my age on my public profile")+"</label>";A+="<p>";this.content.set("html",A);this.attachEvents();this.rebuildDays();return this.content},rebuildDays:function(){var A=31;if(this.selectMonth.selectedIndex){A=new Date(this.selectYear.selectedIndex>0?this.selectYear.value:1920,this.selectMonth.value,0).getDate()}var C=(this.selectDay.selectedIndex>0)?this.selectDay.selectedIndex:0;this.selectDay.empty();for(var B=0;B<=A;B++){new Element("option",{text:(B==0)?_("Day:"):B,value:B}).inject(this.selectDay)}this.selectDay.selectedIndex=(this.selectDay.options.length>C)?C:0},attachEvents:function(){this.errorMsg=this.content.getElement(".error");var A=this.content.getElements("select");this.inputFullname=$(this.content.getElementsByTagName("input")[0]);this.selectMonth=A[1];this.selectDay=A[2];this.selectYear=A[3];this.inputFullname.addEvent("blur",this.validateFullname.bindWithEvent(this));this.selectMonth.addEvent("change",this.rebuildDays.bindWithEvent(this));this.selectYear.addEvent("change",this.rebuildDays.bindWithEvent(this));this.selectMonth.addEvent("change",this.validateBirthday.bindWithEvent(this));this.selectYear.addEvent("change",this.validateBirthday.bindWithEvent(this));this.selectDay.addEvent("change",this.validateBirthday.bindWithEvent(this))},validateFullname:function(){var A=this.inputFullname.value.trim().length>0;this.inputFullname.getNext().className=A?"valid":"invalid";return A},is13YearsOld:function(){var A=new Date();return(new Date(this.selectYear.value,this.selectMonth.selectedIndex,this.selectDay.selectedIndex)<new Date().setFullYear(A.getFullYear()-13,A.getMonth(),A.getDate()))},validateBirthday:function(){var A=(this.selectMonth.selectedIndex&&this.selectDay.selectedIndex&&this.selectYear.selectedIndex&&this.is13YearsOld());this.selectYear.getNext().className=A?"valid":"invalid";return A},onNextStep:function(){var A=(this.validateBirthday()&this.validateFullname());if(!this.is13YearsOld()){this.errorMsg.set("html",_("Sorry, you must be at least 13 years old to use netvibes")).show();return false}this.errorMsg.hide();var B=this.wizard.getNextButton();B.addClass("wizard-button-disabled");B.getFirst().set("text",_("Loading..."));if(A&&!(this.request&&this.request.running)){this.request=new Request({url:"/ajax/user/suggest.php",data:$("wizard").toQueryString(),onComplete:this.onSuggestResponse.bind(this)}).POST()}return false},onSuggestResponse:function(C){var A=JSON.decode(C);if(typeof A=="object"){A=$A(A)}else{A=[]}this.wizard.suggest=A;var B=this.wizard.getNextButton();B.removeClass("wizard-button-disabled");B.getFirst().set("text",this.wizard.options.nextStepButtonText);this.wizard.nextStep();this.request=null}});
	
App.Wizard.Register.NetvibesID=new Class({
	initialize:function(A){this.wizard=A},toElement:function(){this.content=new Element("div");var A="";A+="<h3>"+_("Your public page will have this url:")+"</h3>";A+='<p class="error" style="display:none"></p>';A+='<p class="field username">';A+="</p>";A+='<p class="info">'+_("Avoid using generic dictionary names, brands or people names.")+"</p>";A+="<h3>"+_("Account type:")+"</h3>";A+='<p class="field">';A+='<label><input name="accountType" type="radio" value="personnal" checked="checked" />'+_("Personal")+"</label>";A+='<em class="description">'+_("I am using this public page for my personnal use (e.g. johnsmith, sandra 95)")+"</em>";A+='<label style="margin-top:10px"><input name="accountType" type="radio" value="pro" />'+_("Pro")+"</label>";A+='<em class="description">'+_("I am using this public page on behalf of a brand, a celebrity or an organization (e.g. Nike, Cartier, Coke)")+"</em>";A+="</p>";this.content.set("html",A);this.attachEvents();return this.content},attachEvents:function(){this.errorMsg=this.content.getElement(".error")},onShow:function(){var A=this.content.getElement("p.username").empty();if(this.wizard.suggest.length>0){var C=new Element("label",{"for":"usernameSuggest1"}).grab(new Element("input",{id:"usernameSuggest1",type:"radio",name:"suggest",value:this.wizard.suggest[0],checked:"checked",events:{click:this.onRadioUsernameChange.bindWithEvent(this)}})).grab(new Element("span",{text:"netvibes.com/"+this.wizard.suggest[0]})).inject(A)}if(this.wizard.suggest.length>1){var C=new Element("label",{"for":"usernameSuggest2"}).grab(new Element("input",{id:"usernameSuggest2",type:"radio",name:"suggest",value:this.wizard.suggest[1],events:{click:this.onRadioUsernameChange.bindWithEvent(this)}})).grab(new Element("span",{text:"netvibes.com/"+this.wizard.suggest[1]})).inject(A)}var C=new Element("label",{"for":"usernameCustom",styles:{display:"inline"}});if(this.wizard.suggest.length>0){C.grab(new Element("input",{id:"usernameCustom",type:"radio",name:"suggest",value:"",events:{click:this.onRadioUsernameChange.bindWithEvent(this)}}));this.content.getElement("p.info").hide()}C.grab(new Element("span",{text:"netvibes.com/"})).inject(A);var B=new Element("input",{id:"inputNetvibesID",name:"username","class":"text",events:{focus:this.onFocusCustomUsername.bindWithEvent(this)}}).inject(A)},onFocusCustomUsername:function(){$("usernameCustom").set("checked","checked");this.content.getElement("p.info").show()},onRadioUsernameChange:function(B){var A=this.content.getElement("p.info");switch(B.target.id){case"usernameCustom":A.show();break;default:A.hide();$("inputNetvibesID").value="";break}},validate:function(){var A=this.inputUsername.value.trim().length>1;this.inputUsername.getNext().className=A?"valid":"invalid";if(!A){this.inputUsername.yellowFade()}return A},onFinish:function(){var A=$("wizard-finish");A.addClass("wizard-button-disabled");A.getFirst().set("text",_("Saving..."));if(!(this.request&&this.request.running)&&!A.disabled){this.request=new Request({url:"/ajax/user/signUp.php",data:$("wizard").toQueryString(),onComplete:this.onRegistered.bind(this)}).post()}A.disabled=true},onRegistered:function(B){switch(B){case"success":Cookie.set("registered",2);window.location.reload(true);return ;case"inuse":this.errorMsg.show().set("html",_("Sorry, this Netvibes ID is already in use. Please try another one."));break;default:this.errorMsg.show().set("html",_("Sorry, an error has occurred. Try again later."));break}var A=$("wizard-finish");A.disabled=false;A.removeClass("wizard-button-disabled");A.getFirst().set("text",this.wizard.options.finishButtonText)}});
	
App.showCreateUniverseWizard=function(){
	var B=[];if(App.registeredUser){B.push({title:_("Confirm your email"),content:App.Wizard.Register.VerifyEmailStep})}else{B.push({title:_("Sign up"),content:App.Wizard.Register.EmailPasswordStep})}B.push({title:_("Your public profile"),content:App.Wizard.Register.ProfileStep});B.push({title:_("Your public address"),content:App.Wizard.Register.NetvibesID});App.Panel.close();var A=new App.Wizard(B,{formAction:"/ajax/user/signUp.php",title:_("Create your public page")})};;

//40
App.Panel={
	closeButton:null,
	element:null,
	current:"",
	profileViewer:null,
	////initialized at App.Start();
	initialize:function(){
		for(var B=0,A=$("top").getElements("a"),C;C=A[B];B++){
			if(C.hasClass("disabled")){continue}
			if(!C.rel.length){continue}
			C.onclick=function(){App.Panel.toggle(this.rel);App.Panel.setActiveTopBar(this)}
		}
		////添加到 id为top 的div后面,默认为hideen
		this.panel=new Element("div",{id:"nv-panel","class":"autoclear"}).hide().injectAfter("top");
		this.element=new Element("div",{id:"nv-panel-content"}).inject(this.panel);
		this.profiles=new App.Panel.ProfilesStack().inject(this.panel);
		this.closeBar=new Element(
			"a",{id:"nv-panel-closebar","class":"nv-panel-closebar",rel:"close",title:_("Close")}
		).hide().injectAfter(this.panel);
		new Element("img",{src:App.getStaticUrl("/img/s.gif")}).injectInside(this.closeBar);
		this.closeBar.addEvent("click",this.close.bind(this))
	},
	toggle:function(A){
		if(this.current!=A&&this._open){this.open(A)}else{this[this._open===true?"close":"open"](A)}
	},
	open:function(A){
		this.profiles.reset().hide();
		this.panel.show();
		this.element.show();
		this.closeBar.show();
		if(A=="SignIn"||(this.element.loaded===false)||(this.current!=A&&typeof this[A]!=undefined)){
			this.current=A;this[A].onShow();this.element.loaded=true}
		this.addCloseButton();
		this._open=true
	},
	showProfile:function(A,B){if(!this._open){this.open("Friends")}this.profiles.addProfile(A,B)
	},
	close:function(){this.removeCloseButton();this.setActiveTopBar(false);this.panel.hide();this.closeBar.hide();this._open=false},
	addCloseButton:function(){
			if(this.closeButton){return }
			this.closeButton=new Element("img",{id:"panelCloseButton",src:App.getStaticUrl("/img/s.gif"),title:_("Close")}).inject(document.body);
			this.closeButton.onclick=App.Panel.close.bind(this)
	},
	removeCloseButton:function(){
		if(this.closeButton&&this.closeButton.parentNode){
			Element.remove(this.closeButton);this.closeButton=null
		}
	}
};

App.Panel.setActiveTopBar=function(A){
	$("top").getElements("li").removeClass("active");if(A&&App.Panel._open){$(A.parentNode.parentNode).addClass("active")}
};
App.Panel.wait=function(A){if(typeof A=="undefined"){A=this.element}A.innerHTML='<div class="loading">'+_("Loading...")+"</div>"};
App.Panel.askForSignIn=function(){
	var A='<div class="registernotice">';A+="<h2>"+_("You must first register to netvibes in order access this feature")+"</h2>";A+='<p><input id="signupNow" type="button" class="nv-button" value="'+_("Sign up")+'" /></p>';A+="</div>";
	App.Panel.element.innerHTML=A;
	$("signupNow").onclick=function(){window.location.href="/signup";return false}};
App.Panel.SignIn={};
App.Panel.SignIn.onShow=function(){App.Panel.element.empty().adopt(App.Login.build());App.Login.attachSignInEvents()};
App.Panel.buildSearchForm=function(A,D){
	var D=$merge({value:null},D);var F=new Element("form",{styles:{position:"relative"}});F.onsubmit=function(){return false};var E=function(I){if(I.type=="keydown"&&I.key!="enter"){return true}if(G.value.trim()==""){return }arguments.callee.queue=arguments.callee.queue||0;if(arguments.callee.queue>0){return }++arguments.callee.queue;setTimeout(function(){this.queue=0}.bind(arguments.callee),1000);H.style.display="inline";A.onExecuteSearch(G.value)};var G=new Element("input",{type:"text","class":"text"}).addEvent("keydown",E).inject(F);if(D.value){function C(){if(this.value.trim()==""){this.addClass("defaultText");this.value=D.value}}C.bind(G)();G.addEvent("blur",C);G.addEvent("focus",function(I){if(this.value==D.value){this.value="";this.removeClass("defaultText")}})}var H=new Element("img",{src:App.getStaticUrl("/img/clear.gif"),title:_("Clear"),styles:{cursor:"pointer",position:"absolute",top:"7px",display:"none"}}).setStyle(App.dirRTL?"margin-right":"margin-left","-25px").addEvent("click",function(I){I.target.hide();G.value="";if(A.onResetSearch){A.onResetSearch()}if(D.value){C.bind(G)()}}).inject(F);var B=new Element("input",{type:"image",src:App.getStaticUrl("/img/s.gif"),"class":"image",height:16,width:16}).addEvent("click",E).inject(F);return F};
App.Panel.draggableItem=function(B,A){
	B.addEvent("mousedown",function(D){
		var E=this.clone();
		if(this.retrieve("richIcon")){E.getFirst("img").src=this.retrieve("richIcon")}
		var C=new Element("div",{id:"ghostContainer"});
		E.inject(C);E=C;E.setStyles({position:"absolute",zIndex:"150",display:"none"});
		E.inject(document.getElementsByTagName("BODY")[0]);
		D.clientX=D.client.x;D.clientY=D.client.y;
		App.DragMe(
			E,
			E,
			function(F,I,H,G){E.dontDragYet=true;D.stop()},
			function(F,J,I,H){
				if(!arguments.callee.starter&&Browser.isIE){arguments.callee.starter=true;return }
				if(!App.draggingItem){
					if($("tooltip")){$("tooltip").hide()}
					E.setStyle("display","block");
					var G=E.getSize();
					moduleGhost.elm.style.height=G.y+"px";E.setStyles({left:(D.page.x-G.x/2)+"px",top:(D.page.y-G.y/2)+"px"});
					App.draggingItem=true
				}
			},
			function(F,J,I,G){
				if(J<300){E.destroy();return }
				var H=new Module($extend($unlink(A),{container:moduleGhost.col.getAttribute("colNum"),admin:false,isNew:true,tab:G}),{nativise:true}).load();
				App.moduleList.push(H);
				App.saveUserData("new",H)
			},
			D,
			true
		)
	})
};
	
App.Panel.ProfilesStack=new Class({
	Implements:[Events,Options],
	initialize:function(A){
		this.container=new Element("div",{id:"profileWrapper",styles:{display:"none"}})
	},
	inject:function(A){
		$(A).adopt(this.container);return this
	},
	reset:function(){
		if(this.container.childNodes.length){$$(this.container.childNodes).destroy()}return this
	},
	hide:function(){
		this.container.hide();return this
	},
	addProfile:function(A,C){
		$A(this.container.childNodes).each(function(D){D.style.display="none"});
		var B=new App.UI.Profile(this.container,{enableBack:true});
		B.addEvent("onBack",this.onButtonBackClicked.bind(this));
		B.addEvent("onRemove",this.onFriendRemoved.bind(this));
		B.addEvent("onAdd",this.onFriendAdded.bind(this));
		B.show(A,C)
	},
	onButtonBackClicked:function(B){
		var A=this.container.lastChild;
		if(A){A.destroy()}A=this.container.lastChild;
		if(A){A.show();A.getElementsByClassName("loading").each(function(C){C.removeClass("loading")})}else{App.Panel.open(App.Panel.current)}if(B){B.stop()}
	},
	onFriendRemoved:function(A){this.synchroniseMyFriends(A,true)},
	onFriendAdded:function(A){this.synchroniseMyFriends(A,false)},
	synchroniseMyFriends:function(B,A){
		var F=null;
		var E=null;
		$("nv-panel").getElements("li.subscription").each(function(H){
			if(H.retrieve("friendId")==B){if(A){H.removeClass("following")}else{H.addClass("following")}if(!F&&H.retrieve("data")){F=H.retrieve("data")}}}
		);
		var C=App.Panel.element.getElement("li.subscriptions");
		if(!C||!F){return }
		C.getFirst().setHTML(_("Friends")+" <em>"+User.numFriends+"</em>");
		var D=App.Panel.Friends.tabs.getTabContent("subscriptions");
		if(D){
			var G=D.retrieve("viewer");
			if(A){
				G.multiPage.items.remove(F);G.multiPage.total--;
				D.getElements("li").each(function(H){if(H.retrieve("friendId")==B){H.destroy()}})
			}else{
				F.isFriend=true;G.multiPage.items.push(F);G.multiPage.total++
			}
			D.retrieve("viewer").multiPage.computeState()
		}
	}
});;

//41
if(!App.Panel.Drive){App.Panel.Drive={}}
App.Panel.Drive.onShow=function(){App.Panel.Drive.onLoading()};
var AGConf={
	domain:"http://lah.back.agematis.loc/",
	UIDomain:"/",
	imgURL:function(){return this.UIDomain+"img/drive/"},
	proxyURL:function(){return this.UIDomain+"proxy/steekrProxy.php"},
	units:{BYTE:"byte",BYTES:"bytes",KB:"KB",MB:"MB",GB:"GB"}
};
var AGTools={
	getUGURL:function(C,B,A){
		return"command="+C.toLowerCase()+"&parameters="+encodeURIComponent(JSON.encode(B))+"&options="+encodeURIComponent(JSON.encode(A))
	},
	get_size:function(E){
		var B=0;var D=E;
		while(D>1024){D=D/1024;B++}
		D=Math.round(D);
		if(E<2){
			var C=AGConf.units.BYTE
		}else{
			var A=new Array(AGConf.units.BYTES,AGConf.units.KB,AGConf.units.MB,AGConf.units.GB);var C=A[B]
		}
		return D+" "+C
	}
};
var AGUser={
	alias:false,spaceUsed:false,spaceMax:false,rootFolder:false,sync:false,
	getInfos:function(){
		var B={};var A={};
		new Request().addEvent("onComplete",this.processInfos).get(AGConf.proxyURL(),{url:AGTools.getUGURL("LSUSER",B,A)})
	},
	processInfos:function(A){
		A=JSON.decode(A);AGUser.alias=A.READ[0].alias;AGUser.spaceUsed=A.READ[0].space_used;AGUser.spaceMax=A.READ[0].space_max;
		AGUser.rootFolder=A.READ[0].root_folder;AGBrowser.display();
		if(!$defined(AGBrowser.currentFolder)){AGBrowser.currentFolder=AGUser.rootFolder}
	}
};
var AGBrowser={
	currentFolder:false,uploadUrl:false,display:function(A,E,B){if(!$defined(A)){A=AGUser.rootFolder}if(!$defined(E)){E="name"}if(!$defined(B)){B="ASC"}this.currentFolder=A;var D={};D.id=AGBrowser.currentFolder;var C={};C.options="DF";C.sorts="type,init,"+E;C.ways="ASC,DESC,"+B;new Request().addEvent("onComplete",this.process).get(AGConf.proxyURL(),{url:AGTools.getUGURL("FOLDER",D,C)})},process:function(D){D=JSON.decode(D);if(!D.ERROR[0]){var A=D.READ;AGBrowser.uploadUrl=D.META[0].upload;AGHeader.drawHeader();AGBrowser.initItemListDisplay(D.META[0].id_parent);if(A.length>0){for(var C=0;C<A.length;C++){var B=A[C];if(B.init==5){AGUser.sync=B.id}else{if(B.init!=42&&B.init!=8){if(B.type=="D"){if(B.init==1){B.name="My Documents"}else{if(B.init==2){B.name="My Musics"}else{if(B.init==3){B.name="My Pictures"}else{if(B.init==4){B.name="My Videos"}}}}AGBrowser.drawFolder(B)}else{AGBrowser.drawFile(B)}}}}}else{AGDriveContainer.innerHTML=AGDriveContainer.innerHTML+_("Empty folder...")}}else{}},initItemListDisplay:function(A){if(!$defined(AGDriveContainer)){AGDriveContainer=$("AGDriveContainer")}AGDriveContainer.innerHTML="";if(A!=0){AGHeader.displayUploadForm(AGBrowser.currentFolder,AGBrowser.uploadUrl);AGDriveContainer.innerHTML='<a href="#" onclick="AGBrowser.display('+A+');return false;"><img src="'+AGConf.imgURL()+'folder.png" border="0" />[..]</a>'}else{AGHeader.hideUploadForm()}AGDriveContainer.innerHTML=AGDriveContainer.innerHTML+'<table width="80%" border="0" cellspacing="0" cellpadding="0" id="AgTgtItemListTable"></table>'},drawFolder:function(A){var B="&nbsp;";if(A.init==""){B='<a href="#" onclick="AGBrowser.deleteItem('+A.id+",'D');return false;\">"+_("Delete")+"</a>"}$("AgTgtItemListTable").innerHTML=$("AgTgtItemListTable").innerHTML+'<tr><td><a href="#" id="AgTrgFolderLink'+A.id+'" onclick="AGBrowser.display('+A.id+');return false;"><img src="'+AGBrowser.get_foldertype_icon(A.init)+'" border="0"/>&nbsp;'+AGBrowser.truncate(A.name,25)+"</td><td>"+AGTools.get_size(A.size)+"</a></td><td>"+A.dated+"</td><td>"+B+"</td></tr>"},drawFile:function(A){$("AgTgtItemListTable").innerHTML=$("AgTgtItemListTable").innerHTML+'<tr><td><a href="'+A.url+'&browser=1" id="AgTrgFileLink'+A.id+'"><img src="'+AGBrowser.get_filetype_icon(A.init)+'" border="0"/>&nbsp;'+AGBrowser.truncate(A.name,25)+"</td><td>"+AGTools.get_size(A.size)+"</a></td><td>"+A.dated+'</td><td><a href="#" onclick="AGBrowser.deleteItem('+A.id+",'F');return false;\">"+_("Delete")+"</a></td></tr>"},deleteItem:function(D,C){if(confirm(_("Are you sure?"))){var B={};B.id=D;B.type=C;var A={};new Request().addEvent("onComplete",AGBrowser.processDeleteItem).get(AGConf.proxyURL(),{url:AGTools.getUGURL("DELETE",B,A)})}},processDeleteItem:function(A){A=JSON.decode(A);if(!A.ERROR[0]){AGBrowser.display(AGBrowser.currentFolder)}else{}},get_filetype_icon:function(B){var A=AGConf.imgURL()+"file.png";var C=this.get_extention(B);if(C=="gif"||C=="jpg"||C=="jpeg"||C=="png"||C=="bmp"||C=="tif"||C=="tiff"||C=="jpe"||C=="pcx"||C=="psd"||C=="psp"){var A=AGConf.imgURL()+"file_img.gif"}else{if(C=="mpg"||C=="mpeg"||C=="mkv"||C=="avi"||C=="divx"||C=="wmv"||C=="mov"||C=="qt"||C=="rm"){var A=AGConf.imgURL()+"file_vid.gif"}else{if(C=="mp3"||C=="wav"||C=="wma"||C=="mid"||C=="ogg"){var A=AGConf.imgURL()+"file_audio.gif"}else{if(C=="zip"||C=="rar"||C=="ace"||C=="gz"||C=="gzip"||C=="hqx"||C=="arj"||C=="lha"||C=="pak"||C=="pit"||C=="sit"||C=="tar"||C=="zoo"||C=="z"||C=="jar"){var A=AGConf.imgURL()+"file_archive.gif"}else{if(C=="doc"||C=="xls"||C=="xla"||C=="ppt"||C=="pps"||C=="pdf"||C=="txt"||C=="rtf"||C=="wps"||C=="word"){var A=AGConf.imgURL()+"file_doc.gif"}else{if(C=="exe"){var A=AGConf.imgURL()+"file_exec.gif"}}}}}}return A},get_extention:function(A){var B=A.lastIndexOf(".");var C=A.slice(B+1);return C.toLowerCase()},get_foldertype_icon:function(A){if(A==""){return AGConf.imgURL()+"folder_default.png"}else{return AGConf.imgURL()+"init_folder_"+A+".png"}},truncate:function(A,C){if(A.length>C){var B=A.lastIndexOf(".");if(B==-1){return A.slice(0,C)+"[...]"}else{if(B>C){return A.slice(0,C)+"[...]"+A.slice(B)}else{return A}}}else{return A}}
};
var AGHeader={
	uploadLaunchedState:false,drawHeader:function(){if(!$defined(AGDriveHeader)){AGDriveHeader=$("AGDriveHeader")}AGDriveHeader.innerHTML='<table><tr><td><form name="AGCreateForm" id="AGCreateForm" method="POST" enctype="multipart/form-data" action="" onsubmit="return false;">'+_("Add a folder:")+'&nbsp;<input type="text" name="AGCreateInput" id="AGCreateInput"/>&nbsp;<input type="submit" value="'+_("Submit")+'" id="AGCreateSubmit" onclick="AGHeader.createFolder();" /></form></td><td><div id="AGDriveUploadFormContainer" style="display:none;"><form name="AGUploadForm" id="AGUploadForm" method="POST" enctype="multipart/form-data" action="" target="AGUploadFrame" onsubmit="AGHeader.uploadLaunchedState=true;">'+_("Upload a file:")+'&nbsp;<input type="file" name="file" id="AGUploadInput"/>&nbsp;<input type="submit" value="'+_("Submit")+'" id="AGUploadSubmit" /></form><iframe src="" width="1" height="1" name="AGUploadFrame" id="AGUploadFrame" style="display:none;"></iframe></div></td></tr></table>'},displayUploadForm:function(A,C){var D={};D.target=A;var B={};B.nomenclatura="Copy %%increment%% of";$("AGUploadForm").action=C;$("AGDriveUploadFormContainer").style.display="block";if(window.ie){$("AGUploadFrame").onreadystatechange=function(E){if($("AGUploadFrame").readyState=="complete"){AGHeader.onCompleteUpload()}}}else{$("AGUploadFrame").onload=function(E){AGHeader.onCompleteUpload()}}$("AGUploadFrame").onsubmit=function(){$("AGDriveUploadFormContainer").style.visibility="hidden";return true}},hideUploadForm:function(){$("AGDriveUploadFormContainer").style.display="none"},onCompleteUpload:function(){if(AGHeader.uploadLaunchedState){AGHeader.uploadLaunchedState=false;AGBrowser.display()}},createFolder:function(){var B={};B.id=AGBrowser.currentFolder;B.name=$("AGCreateInput").value;var A={};A.nomenclatura="%%su%% (%%increment%%)%%su%%";new Request().addEvent("onComplete",this.processCreateFolder).get(AGConf.proxyURL(),{url:AGTools.getUGURL("MKFOLDER",B,A)})},processCreateFolder:function(A){A=JSON.decode(A);if(!A.ERROR[0]){AGBrowser.display(AGBrowser.currentFolder)}else{}}
};
var AGDriveHeader;
var AGDriveContainer;
App.Panel.Drive.onLoading=function(A){
	App.Panel.element.empty();App.Panel.Drive.tabs=new Netvibes.UI.TabView({position:"left",classTabList:"nav",classTabContent:"tabContent"});App.Panel.Drive.tabs.addTab("myFiles",{text:_("My Files")});App.Panel.Drive.tabs.observe("activeTabChange",App.Panel.Drive.onActiveTabChanged);App.Panel.Drive.tabs.selectTab("myFiles");App.Panel.Drive.tabs.appendTo(App.Panel.element)
};
App.Panel.Drive.onActiveTabChanged=function(A){
	var B=$(App.Panel.Drive.tabs.getTabContent(A));if(B.loaded){return }B.empty();
	switch(A){
		case"myFiles":
			AGDriveHeader=new Element("div").inject(B);AGDriveHeader.id="AGDriveHeader";AGHeader.drawHeader();AGDriveContainer=new Element("div").inject(B);AGDriveContainer.id="AGDriveContainer";AGUser.getInfos();break;
		case"sent":void (0);break;
		case"received":void (0);break;
		case"myComputer":
			AGDriveHeader=new Element("div").inject(B);
			AGDriveHeader.id="AGDriveHeader";AGHeader.drawHeader();
			AGDriveContainer=new Element("div").inject(B);
			AGDriveContainer.id="AGDriveContainer";AGBrowser.display(AGUser.sync);void (0);break
	}
};;

//42
if(!App.Panel.AddContent){
	App.Panel.AddContent={}
}
App.Panel.AddContent.DLA=[
	{title:_("Web Search"),
		moduleName:"Vibes",data:{type:"web"},ico:App.getStaticUrl(NV_PATH+"img/search.gif"),alternIco:App.getStaticUrl(NV_PATH+"img/panel/search-icons/web.png"),richIcon:App.getStaticUrl(NV_PATH+"modules/vibes/richicon-search.png"),appendToSearch:_("on the web")},
	{title:_("Blog Search"),
		moduleName:"Vibes",data:{type:"blog"},ico:App.getStaticUrl(NV_PATH+"modules/imagesSearch/favicon.png"),alternIco:App.getStaticUrl(NV_PATH+"img/panel/search-icons/blog.png"),richIcon:App.getStaticUrl(NV_PATH+"modules/vibes/richicon-blog.png"),appendToSearch:_("in blogs")},
	{title:_("Images Search"),moduleName:"Vibes",data:{type:"image"},ico:App.getStaticUrl(NV_PATH+"modules/imagesSearch/favicon.png"),alternIco:App.getStaticUrl(NV_PATH+"img/panel/search-icons/image.png"),richIcon:App.getStaticUrl(NV_PATH+"modules/vibes/richicon-image.png"),appendToSearch:_("in online photos")},
	{title:_("Video Search"),moduleName:"Vibes",data:{type:"video"},ico:App.getStaticUrl(NV_PATH+"img/video-player.gif"),alternIco:App.getStaticUrl(NV_PATH+"img/panel/search-icons/video.png"),richIcon:App.getStaticUrl(NV_PATH+"modules/vibes/richicon-video.png"),appendToSearch:_("in online videos")},
	{title:_("Podcast Search"),moduleName:"Vibes",data:{type:"podcast"},ico:App.getStaticUrl(NV_PATH+"img/speaker.gif"),alternIco:App.getStaticUrl(NV_PATH+"img/panel/search-icons/podcast.png"),richIcon:App.getStaticUrl(NV_PATH+"modules/vibes/richicon-podcast.png"),appendToSearch:_("in podcasts")},
	{title:_("Map Search"),moduleName:"MapsSearch",data:{type:"map"},ico:App.getStaticUrl(NV_PATH+"img/cart.gif"),alternIco:App.getStaticUrl(NV_PATH+"img/panel/search-icons/map.png"),richIcon:App.getStaticUrl(NV_PATH+"modules/vibes/richicon-map.png"),appendToSearch:_("on a map")},
	{title:_("Shopping Search"),moduleName:"Vibes",data:{type:"shopping"},ico:App.getStaticUrl(NV_PATH+"img/cart.gif"),alternIco:App.getStaticUrl(NV_PATH+"img/panel/search-icons/shopping.png"),richIcon:App.getStaticUrl(NV_PATH+"modules/vibes/richicon-shopping.png"),appendToSearch:_("shopping")}
];
App.Panel.AddContent.News=[
	{moduleName:"MultipleFeeds",title:"Google News",infos:"Google News",icon:App.getStaticUrl(NV_PATH+"modules/vibes/img/google.png"),richIcon:App.getStaticUrl(NV_PATH+"modules/multipleFeeds/providers/google/richicon.png"),data:{provider:"google"}},
	{moduleName:"MultipleFeeds",title:"Yahoo! News",infos:"Yahoo! News",icon:App.getStaticUrl(NV_PATH+"modules/vibes/img/yahoo.png"),richIcon:App.getStaticUrl(NV_PATH+"modules/multipleFeeds/providers/yahoo/richicon.png"),data:{provider:"yahoo"}}
];
if(User.locale=="cn"||App.locale=="cn"){
	App.Panel.AddContent.News.splice(0,0,{moduleName:"MultipleFeeds",title:"Baidu News",infos:"Baidu News",icon:App.getStaticUrl(NV_PATH+"modules/vibes/img/baidu.png"),richIcon:App.getStaticUrl(NV_PATH+"modules/multipleFeeds/providers/baidu/richicon-baidu.png"),data:{provider:"baidu"}})}
if(!App.visit){
	App.Panel.AddContent.Essentials=[{title:_("Basic widgets"),expanded:true,items:[{moduleName:"Weather"},{moduleName:"PostIt"},{moduleName:"TodoList"},{moduleName:"Ical"},{moduleName:"Bookmarks"},{moduleName:"LinkModule"},{moduleName:"FriendActivities"}]},{title:_("Wizard"),items:[{moduleName:"MailWizard"}]},{title:_("News"),items:App.Panel.AddContent.News},{title:_("Applications Premium"),items:[{moduleName:"BoxNet"},{moduleName:"CraigsList"},{moduleName:"Delicious"},{moduleName:"DiggOfficial"},{moduleName:"Ebay"},{moduleName:"Facebook",newFeature:true},{moduleName:"Flickr"},{moduleName:"Myspace"},{moduleName:"Twitter"}]},{title:_("External widgets"),items:[{title:_("HTML"),moduleName:"UWA",data:{_type:"external"},richIcon:App.getStaticUrl(NV_PATH+"modules/externalWidget/richicon.png"),ico:App.getStaticUrl(NV_PATH+"modules/externalWidget/img/icon-api.gif")},{moduleName:"WebPage"},{moduleName:"Flash"}]},{title:_("Applications"),items:[{moduleName:"Alexa"},{moduleName:"SocialWizard"},{moduleName:"Aol"},{moduleName:"FoxSportsVideo"}]},{title:_("E-Mail"),items:[{moduleName:"PopMail"},{moduleName:"YahooMail"},{moduleName:"Gmail"},{moduleName:"Hotmail"},{moduleName:"AolMail"},{moduleName:"MacMail"}]},{title:_("Search"),items:App.Panel.AddContent.DLA},{title:"Netvibes",items:[{moduleName:"UWA"},{moduleName:"Eco"}]}]
}else{
	App.Panel.AddContent.Essentials=[{title:_("Basic widgets"),expanded:true,items:[{moduleName:"PostIt"},{moduleName:"ImageModule"},{moduleName:"Wall"},{title:_("HTML"),moduleName:"UWA",data:{_type:"external"},richIcon:App.getStaticUrl(NV_PATH+"modules/externalWidget/richicon.png"),ico:App.getStaticUrl(NV_PATH+"modules/externalWidget/img/icon-api.gif")},{moduleName:"WebPage"},{moduleName:"LinkModule"},{moduleName:"UWA"}]},{title:_("Instant messenger badges"),expanded:true,items:[{moduleName:"UniverseSkype"},{moduleName:"UniverseYahooMessenger"},{moduleName:"UniverseLiveMessenger"},{moduleName:"UniverseAIM"},{moduleName:"UniverseGTalk"},{moduleName:"UniverseICQ"},{moduleName:"UniverseQQ"}]},{title:_("Social networks"),expanded:true,items:[{moduleName:"Myspace"},{moduleName:"UniverseFacebook"},{moduleName:"Twitter",data:{_type:"user"}}]},{title:_("My photos & videos"),expanded:true,items:[{moduleName:"Flickr",data:{univ:"1"}},{moduleName:"UniversePicasa"},{moduleName:"UniverseYoutube"},{moduleName:"UniverseDailymotion"}]},{title:_("Other cool widgets"),expanded:true,items:[{moduleName:"MeeboRooms"},{moduleName:"Digg",data:{_type:"user"}},{moduleName:"UniverseLastFM"},{moduleName:"Weather"},{moduleName:"TodoList"},{moduleName:"Ical"}]},{title:_("Search"),items:App.Panel.AddContent.DLA}]
}
App.Panel.AddContent.Eco={
	categories:[{id:1,label:_("News")},{id:2,label:_("Business")},{id:3,label:_("Sport")},{id:4,label:_("Music")},{id:5,label:_("Art & Entertainment")},{id:6,label:_("Technology")},{id:7,label:_("Games")},{id:8,label:_("Lifestyle")},{id:9,label:_("Tools & Services")},{id:10,label:_("Shopping")},{id:11,label:_("Science")},{id:12,label:_("Education")},{id:13,label:_("Travel")},{id:14,label:_("Organizations")}]
};;

//43
if(!App.Panel.AddContent){App.Panel.AddContent={}}
////弹出的feed订阅预览
App.Panel.AddContent.showPopup=function(A){new App.UI.Preview(A).open()};
App.Panel.AddContent.onShow=function(){App.Panel.AddContent.onLoading()};
App.Panel.AddContent.onExecuteSearch=function(A){
	App.Panel.AddContent.searchResults=App.Panel.AddContent.tabs.getTabContent("Search");App.Panel.AddContent.tabs.selectTab("Search");App.Panel.AddContent.renderSearchQuery({query:A})};
App.Panel.AddContent.onLoading=function(C){
	if(!App.Panel.AddContent.Eco){
		function B(){
			new Request.JSON({secure:false,onComplete:function(D){App.Panel.AddContent.Eco=D},onFailure:function(){B.delay(5000)}}).get("/proxy/ajaxProxy.php",{url:"http://api.eco.netvibes.com/categories?format=json&parent=0"})
		}
		B()
	}
	App.Panel.element.empty();
	App.Panel.AddContent.tabs=new Netvibes.UI.TabView({position:"left",classTabList:"nav",classTabContent:"tabContent",allowReload:true});
	var A=App.Panel.buildSearchForm(this,{value:_("Search for widgets")});
	App.Panel.AddContent.tabs.addTab("Search",{text:A}).onclick=null;
	App.Panel.AddContent.tabs.addTab("browseContent",{text:_("Browse categories")});
	App.Panel.AddContent.tabs.addTab("essentialWidgets",{text:_("Essential widgets")});
	App.Panel.AddContent.tabs.addTab("addFeed",{text:_("Add a feed")});
	if(App.wizardCustomEnabled()){
		App.Panel.AddContent.tabs.addTab("wizardCustom",{text:_("Start wizard")}).onclick=function(){
			App.showWizardCustom();return false}}
	A.parentNode.removeAttribute("href");
	App.Panel.AddContent.tabs.observe("activeTabChange",App.Panel.AddContent.onActiveTabChanged);
	App.Panel.AddContent.tabs.selectTab("browseContent");
	App.Panel.AddContent.tabs.appendTo(App.Panel.element)
};
App.Panel.AddContent.onActiveTabChanged=function(b){
	var D=$(App.Panel.AddContent.tabs.getTabContent(b));
	if(D.loaded&&(D.loaded==App.locale)){
		App.Panel.AddContent.searchResults=$(D.getElementsByClassName("searchResults")[0]);return }
	D.empty();D.addClass("addContent");
	App.Panel.AddContent.sponsoredFlag=true;

	////搜索widgets,浏览种类,最重要的widgets,添加一个feed
	switch(b){
		////搜索widgets
		case"Search":break;

		////添加一个feed
		case"addFeed":
			var a=new Element("h2").setText(_("Add a feed")).inject(D);D.style.width="auto";
			var W=new Element("div",{"class":"feedform"}).inject(D);
			var C=new Element("form",{"class":"searchForm"}).addEvent(
				"submit",function(c){
				////单击‘添加feed’按钮后的处理
					Y.style.display="inline";
					////Loading
					App.Panel.AddContent.searchResults.wait(null,{top:"180px"});
					////回调
					App.addNewFeed(X.value,App.Panel.AddContent.onFeedResponse);
					return false ////防止页面提交到下一页
				}).inject(W);
			var E=new Element("fieldset",{styles:{position:"relative"}}).inject(C);
			var F=new Element("label",{"for":"addfeedurl"}).setText(_("Enter a feed address or website URL for autodetection")).inject(E);
			var X=new Element("input",{type:"text","class":"text",id:"addfeedurl"}).inject(E);
			var Y=new Element(
				"img",{src:App.getStaticUrl("/img/clear.gif"),title:_("Clear"),styles:{cursor:"pointer",position:"absolute",top:"18px",display:"none"}}
			).setStyle(App.dirRTL?"margin-right":"margin-left","-20px"
			).inject(E).addEvent(
				"click",function(c){App.Panel.AddContent.onActiveTabChanged("addFeed")}
			);

			////‘添加feed’按钮
			var R=new Element("input",{type:"submit","class":"nv-button",value:_("Add feed")}).inject(E);
			App.Panel.AddContent.searchResults=new Element("div",{"class":"searchResults"}).inject(D);
			new Element("div",{"class":"help"}).inject(App.Panel.AddContent.searchResults).set(
				"html","<p>"+_("Locate the feed address on the website. It is usually represented with one of the following icons:")+' <img src="'+App.getStaticUrl(NV_PATH+"img/rss.gif")+'" alt="RSS"/> <img src="'+App.getStaticUrl(NV_PATH+"img/add/rss.png")+'" alt="RSS"/> <img src="'+App.getStaticUrl(NV_PATH+"img/add/atom.png")+'" alt="ATOM"/> <img src="'+App.getStaticUrl(NV_PATH+"img/add/xml.png")+'" alt="XML"/> <img src="'+App.getStaticUrl(NV_PATH+"img/add/rdf.png")+'" alt="RDF"/></p><p>'+_("Copy and paste this address above.")+" "+_("If you don't see the feed address, you can try to to enter the website address instead. Netvibes will try to autodiscover it.")+'</p><p><a href="http://'+NV_FAQ+'">'+_("Get more information about feeds.")+"</a></p>"
			);
			////OPML导入表单
			var A=new Element(
				"form",{
					id:"addFeedImportForm",
					target:"target_upload",
					action:"/uploadOPML.php",enctype:"multipart/form-data",method:"post",style:"display: none;"}
			).inject(W);
			new Element("iframe",{id:"target_upload",name:"target_upload"}).inject(W);
			var G=new Element("fieldset").inject(A);
			new Element("input",{type:"file",name:"userfile","class":"file"}).inject(G);
			new Element("input",{type:"submit","class":"submit",value:_("Import")}).inject(G);
			new Element("input",{type:"hidden",name:"MAX_FILE_SIZE",value:"500000"}).inject(G);
			new Element("input",{type:"hidden",name:"createTabs",value:1}).inject(G);
			if(App.visit){new Element("input",{type:"hidden",name:"universe",value:1}).inject(G)}
			var M=new Element("p",{"class":"opml"}).inject(C).interpolate(_("OPML: {Import}"),{Import:new Element("a",{text:_("Import"),"class":"opml",href:"javascript:void(0)"}).addEvent("click",function(){if("block"==A.getStyle("display")){A.setStyle("display","none")}else{A.setStyle("display","block")}})});
			new Element("a",{text:_("Export"),"class":"opml",href:"/opmlExport.php"+(App.visit?"?universe=1":"")}).inject(M);
			if(true||"firefox"==Browser.name){
				new Element("span",{"class":"firefox"}).inject(M).interpolate(_("If you add feeds regularly, try the {firefoxextension}"),{firefoxextension:new Element("a",{text:_("Firefox extension"),href:"http://eco.netvibes.com/tools"})})
			}
			X.focus();break;
		////最重要的widgets
		case"essentialWidgets":
			new Element("h2").set("text",_("Essential widgets")).inject(D);
			var P=[];
			App.Panel.AddContent.Essentials.each(function(c){
				c.items.each(function(d){
					P.push(d)
				})
			});
			var Q=new Element("div",{"class":"searchResults"}).inject(D);
			var T=new Element("ul",{"class":"searchResults"}).inject(Q);
			var S=new Netvibes.UI.MultiPage({
				items:P,
				displayTotal:true,
				layout:{
					availableWidth:T.getSize().x,
					itemWidth:92,
					numRows:2
				},
				onPageChange:function(c){
					T.empty();
					c.items.each(function(d){
						if(d.typeString){
							App.Panel.AddContent.renderWidget({eco:d}).inject(T)
						}else{
							App.Panel.AddContent.renderWidget({dataObj:d}).inject(T)
						}
					});
					App.Panel.AddContent.attachWidgetEvents()
				}
			}).inject(Q);
			D.loaded=App.locale;break;
		////浏览种类
		case"browseContent":
			var a=new Element("h2",{id:"browseContentTitle"}).set("text",_("Browse categories")).inject(D);
			var V=new Element("div",{"class":"categoryScroll"}).inject(D);
			var O=new Element("a",{"class":"less",href:"javascript:void(0)"}).setText(_("Less")).inject(V);
			var N=new Element("ul",{"class":"categoryList"}).inject(V);
			var Z=new Element("a",{"class":"more",href:"javascript:void(0)"}).setText(_("More")).inject(V);
			var I=new Fx.Scroll(N);
			O.addEvent("click",function(){I.toTop()});
			Z.addEvent("click",function(){I.toBottom()});
			App.Panel.AddContent.searchResults=new Element(
				"div",{"class":"searchResults"}
			).wait(null,{"margin-left":"0",top:"130px","margin-right":"-1em"}).inject(D);
			if(!App.Panel.AddContent.featuredItems){App.Panel.AddContent.featuredItems=[]}
			var U=new Element("li",{"class":"category"}).inject(N);
			var H=new Element(
				"a",{text:App.visit?_("Universe widgets"):_("Featured widgets")}
			).addEvent(
				"click",function(f){
					if(f){f.stop()}
					$$("#nv-panel li.category").removeClass("selected");
					this.getParent().addClass("selected");
					App.Panel.AddContent.searchResults.empty();
					var d=new Element("ul",{"class":"searchResults"}).inject(App.Panel.AddContent.searchResults);
					var c=new Netvibes.UI.MultiPage({
						items:App.Panel.AddContent.featuredItems,
						displayTotal:true,
						layout:{
							availableWidth:d.getSize().x,
							itemWidth:92,
							numRows:2
						},
						onPageChange:function(e){
							d.empty();
							App.Panel.AddContent.sponsoredNb=0;
							App.Panel.AddContent.sponsoredFlag=this.currentPage==1;
							e.items.each(function(g){
								if(g.typeString){
									App.Panel.AddContent.renderWidget({eco:g}).inject(d)
								}else{
									App.Panel.AddContent.renderWidget({dataObj:g}).inject(d)
								}
							});
							App.Panel.AddContent.defineSponsoredContainer(d,this.currentPage);
							App.Panel.AddContent.attachWidgetEvents()
						}
					}).inject(App.Panel.AddContent.searchResults)
				}
			).addEvent(
				"click",App.Panel.AddContent.breadcrumbs
			).inject(U);
			
			if(App.Panel.AddContent.featuredItems.length==0||D.loaded!=App.locale){
				var K=App.visit?"http://api.eco.netvibes.com/search/?flag=256&customsort=sponsored%2Ctype_native%2Cpick%2Cfeatured%2Cpopular&":"http://api.eco.netvibes.com/featured?";
				var L={thumbtype:"ginger",thumbwidth:64,thumbheight:48,limit:20,format:"json",type:"widget",region:User.locale||App.locale};
				var J=new Request.JSON().addEvent(
					"onComplete",function(c){$extend(App.Panel.AddContent.featuredItems,c.items);H.fireEvent("click",[null,H.get("text")]);if(c.error){this.fireEvent("onFailure")}}
				).addEvent(
					"onFailure",function(){App.Panel.AddContent.searchResults.innerHTML="<p>"+_("The service is temporary unavailable. We apologize for the inconvenience. Please try again later.")+"</p>"}
				).get("/proxy/ajaxProxy.php",{url:K+Hash.toQueryString(L)})
			}
			var B=new Element("li",{"class":"category"}).inject(N);
			new Element(
				"a",{href:"http://"+NV_ECO+"/widgets?flag=512",text:_("Top Blogs")}
			).addEvent(
				"click",function(c){
					if(c){c.stop()}$$("#nv-panel li.category").removeClass("selected");
					this.getParent().addClass("selected");
					App.Panel.AddContent.renderSearchQuery({flag:512})
				}
			).addEvent(
				"click",App.Panel.AddContent.breadcrumbs
			).inject(B);
			if(!App.Panel.AddContent.Eco){return }
			App.Panel.AddContent.Eco.categories.each(function(d){
				var c=new Element("li",{"class":"category"}).inject(N);new Element("a",{href:"http://"+NV_ECO+"/widgets?category="+d.id}).addEvent("click",function(f){if(f){f.stop()}$$("#nv-panel li.category").removeClass("selected");this.getParent().addClass("selected");App.Panel.AddContent.renderSearchQuery({category:d.id})}).addEvent("click",App.Panel.AddContent.breadcrumbs).setText(d.label).inject(c)
			});
			D.loaded=App.locale;
		break
	}
};
App.Panel.AddContent.defineSponsoredContainer=function(A,C){
	var B=A.className.indexOf(" sponsored-");
	if(B!=-1){A.className=A.className.substring(0,B)}
	if(C==1&&App.Panel.AddContent.sponsoredNb&&App.Panel.AddContent.sponsoredNb>0){
		A.addClass("sponsored-"+App.Panel.AddContent.sponsoredNb)
	}
};

////对searchResuls出来的结果,即所有‘添加***到你的页面’按钮提供统一的单击事件以启用预览module(popoup)
App.Panel.AddContent.attachWidgetEvents=function(){
	$$("#nv-panel .widget").each(function(B){
		if(B.eventsAttached){return }
		B.eventsAttached=true;
		var A;
		if(A=$unlink(B.retrieve("dataObj"))){
			B.addEvent("click",function(C){App.Panel.AddContent.showPopup(A);C.stop()});
			App.Panel.draggableItem(B,A)
		}
	})
};
////获得服务器对‘添加feed’响应的处理 E-feed content,H-url;C-type
App.Panel.AddContent.onFeedResponse=function(E,H,C){
	switch(C){
		case"auth":
			App.Panel.AddContent.searchResults.empty();
			var B=new Element("div",{"class":"info"}).inject(App.Panel.AddContent.searchResults);
			var D=new Element("form",{"class":"feedAuth"}).inject(B);
			new Element("p",{"class":"warning"}).setText(_("This feed is protected by a password:")).inject(D);
			if(H.match(/(https?:\/\/)([^@]+@)(.+)/)){new Element("p",{"class":"error"}).setText(_("Wrong login/password")).inject(D)}
			var K=new Element("label").setText(_("Username:")).inject(D);
			var G=new Element("input",{type:"text","class":"text",size:"25"}).inject(K);
			var F=new Element("label").setText(_("Password:")).inject(D);
			var J=new Element("input",{type:"password","class":"password",size:"25"}).inject(F);
			new Element(
				"input",{type:"submit","class":"nv-button nv-primary-button",value:_("ok")}
			).inject(D);
			D.addEvent(
				"submit",function(M){
					M.stop();
					H=H.replace(/(https?:\/\/)([^@]+@)(.+)/,"$1$3");
					var L=encodeURIComponent(G.value)+":"+encodeURIComponent(J.value)+"@";
					H=H.replace(/(https?:\/\/)(.+)/,"$1"+L+"$2");
					App.addNewFeed(H,App.Panel.AddContent.onFeedResponse);
					return"false"
				}
			);
		break;
		////输入一网站url(比如http://news.google.com)将返回所有在该页面上出现的rss、atom等订阅
		case"site":
			new Request().addEvent(
				"onComplete",function(N){
					N=JSON.decode(N);
					App.Panel.AddContent.searchResults.empty();
					var M=new Element("ul",{"class":"discovery"}).inject(App.Panel.AddContent.searchResults);
					if(typeof N!="object"||N.length==0){
						App.Panel.AddContent.searchResults.empty();
						new Element(
							"div",{"class":"info"}
						).setText(_("sorry, no feeds found at this url")).inject(App.Panel.AddContent.searchResults)
					}else{
						////[{"url":"http:\/\/news.google.com\/news?ned=us&output=rss","title":"RSS - Google News","type":"feed"},
						////{"url":"http:\/\/news.google.com\/news?ned=us&output=atom","title":"ATOM - Google News","type":"feed"}]
						if(N.length==1){
							App.Panel.wait(App.Panel.AddContent.searchResults);
							App.addNewFeed(N[0].url,App.Panel.AddContent.onFeedResponse)
						}else{
							var L=new Netvibes.UI.MultiPage({
								items:N,
								displayTotal:true,
								layout:{availableWidth:M.getSize().x,itemWidth:92,numRows:1},
								onPageChange:function(O){
									////清空M节点里面的内容
									M.empty();
									////对feedAutodiscovery.php 获得的数组数据进行处理
									O.items.each(function(P){
										////给出列表方式的“点击此处可添加**到你的页面”
										App.Panel.AddContent.renderWidget({feed:P}).inject(M)
									});
									App.Panel.AddContent.attachWidgetEvents()
								}
							}).inject(App.Panel.AddContent.searchResults)
						}
					}
			}).addEvent(
				"onRequest",function(){
					App.Panel.AddContent.searchResults.wait(null,{top:"180px"})
			}).get("/feedAutodiscovery.php",{url:H});
		break;
		case"webcal":
			App.Panel.AddContent.searchResults.empty();var I=new Feed(E);var A=new Element("ul",{"class":"discovery"}).inject(App.Panel.AddContent.searchResults);App.Panel.AddContent.renderWidget({feed:{id:"webcal",url:H}}).inject(A);App.Panel.AddContent.attachWidgetEvents();break;
		case"feed":
		case"rss":
		default:
			App.Panel.AddContent.searchResults.empty();
			if(typeof C=="undefined"){
				////返回空
				new Element(
					"div",{"class":"info"}
				).setText(_("looks like this feed is not valid or currently not responding")).inject(App.Panel.AddContent.searchResults)
			}else{
				var I=new Feed(E);
				////该feed可用,则将‘’框插入到<div class="searchResults">中
				var A=new Element("ul",{"class":"discovery"}).inject(App.Panel.AddContent.searchResults);
				App.Panel.AddContent.renderWidget(
					{feed:{title:I.title,url:H,type:I.type,id:C}}
				).inject(A);
				////
				App.Panel.AddContent.attachWidgetEvents()
			}
	}
};
App.Panel.AddContent.renderSearchQuery=function(G){
	if(!G){
		var G={}
	}
	G=$merge({query:"",category:0,sort:"popular",region:User.locale||App.locale,type:"widget",format:"json",thumbheight:48,thumbwidth:64,thumbtype:"ginger",type:"widget",customsort:"sponsored,type_native,pick,featured,popular"},G);
	
	App.Panel.AddContent.searchResults.empty();
	if(G.query!=""){
		var E=new Element("div",{"class":"dla"}).inject(App.Panel.AddContent.searchResults);
		new Element("h2").setText(_("Also search {0}").format('"'+G.query+'"')).inject(E);
		var D=new Element("ul",{id:"vibes"}).inject(E);
		App.Panel.AddContent.DLA.each(function(J){
			if(J.appendToSearch){App.Panel.AddContent.renderWidget({dataObj:$merge(J,{data:{search:G.query}})}).grab(new Element("span",{text:J.appendToSearch,"class":"alternateTitle",styles:{"background-image":"url("+J.alternIco+")"}})).inject(D)}
		});
		var F=new Element("h2").setText(_("Search results for the keyword {0}").format('"'+G.query+'"')).inject(App.Panel.AddContent.searchResults);
		var B=$merge(G);B.format="atom";
		var A="http://api.eco.netvibes.com/search/?"+Hash.toQueryString(B);
		var I=new Element("span",{"class":"widget feed",href:A}).store("dataObj",{moduleName:"Eco",title:_("Latest Widgets"),customQuery:B,data:{sortBy:"popular",selectedTab:"widgets"}}).store("richIcon","http://eco.netvibes.com/img/thumbnail/ginger/nopreview-64-48.png.feed.png").injectInside(F);
		new Element("img",{"class":"icon",src:"/img/feed.png"}).inject(I);
		new Element("a",{"class":"title",text:_("Keep track on this search"),href:A}).inject(I)
	}
	var C=new Element(
		"ul",{"class":"searchResults"}
	).inject(App.Panel.AddContent.searchResults).wait(null,{"margin-left":"-7em",top:"50px"});
	var H=new Netvibes.UI.MultiPage.JSON({
		requestUrl:"/proxy/ajaxProxy.php",displayTotal:true,
		layout:{availableWidth:C.getSize().x,itemWidth:92,numRows:2,computePerRequest:true},
		responseParams:{items:"items",total:"total"},
		onRequesting:function(M,O,K,L){
			var J="http://api.eco.netvibes.com/search/?";
			var N={limit:L,page:(O/K)+1};
			M.setOptions({
				data:{url:J+Hash.toQueryString($merge(N,this))}
			})
		}.bind(G),
		onPageChange:function(J){
			C.empty();App.Panel.AddContent.sponsoredNb=0;
			App.Panel.AddContent.sponsoredFlag=this.currentPage==1;
			J.items.each(function(K){
				K.fromQuery=G.query;App.Panel.AddContent.renderWidget({eco:K}).inject(C)
			});
			App.Panel.AddContent.defineSponsoredContainer(C,this.currentPage);
			App.Panel.AddContent.attachWidgetEvents()
		},
		onFailure:function(){C.empty();C.innerHTML="<p>"+_("Unable to retrieve data. Please try again later.")+"</p>"}
	}).inject(App.Panel.AddContent.searchResults)
};
////“点击此处可添加**到你的页面”的页面部分
App.Panel.AddContent.renderWidget=function(B){
	if(B.dataObj){
		var D=$merge(App.Modules[B.dataObj.moduleName+"Infos"],A);var A=$merge(D.defaultObj,B.dataObj);var F=A.title||D.title;var E=A.richIcon||D.richIcon
	}else{
		if(B.feed){
			switch(B.feed.id){case"webcal":var A={moduleName:"Ical",data:{icalUrl:B.feed.url}};break;case"feed":case"rss":default:var A={moduleName:"RssReader",feedUrl:B.feed.url,title:B.feed.title,data:{feedId:B.feed.id}};break}var D=App.Modules[A.moduleName+"Infos"];var E=D.richIcon;var F=B.feed.title
		}else{
			if(B.eco){
				var H=B.eco;
				switch(H.typeString){
					case"feed":case"podcast":
						var A={widgetId:H.id,moduleName:"RssReader",title:H.title,data:{feedUrl:H.link}};break;
					case"flash":case"uwa":
						var A={widgetId:H.id,moduleName:"UWA",title:H.title,data:{moduleUrl:H.link}};break;
					case"native":
						var A={widgetId:H.id,moduleName:H.link,title:H.title,data:{}};break;
					case"miniapi":
						var A={widgetId:H.id,moduleName:"Api",title:H.title,data:{moduleUrl:H.link}};break;
					case"event":var A={widgetId:H.id,moduleName:"Ical",title:H.title,data:{icalUrl:H.link}};break
				}
				var F=H.title;var E=H.thumbnail;
				if(App.Panel.AddContent.sponsoredFlag&&B.eco.campaignActive&&App.Panel.AddContent.sponsoredNb<3){
					A.campaignActive=true;
					A.fromQuery=B.eco.fromQuery;
					if($defined(A.fromQuery)&&A.fromQuery!=""){
						App.report("adc.spon.view.search",{ecoId:(A.ecoId||A.widgetId),query:A.fromQuery,locale:User.locale||App.locale})
					}else{
						App.report("adc.spon.view.browse",{ecoId:(A.ecoId||A.widgetId),locale:User.locale||App.locale})
					}
					App.Panel.AddContent.sponsoredNb++
				}else{App.Panel.AddContent.sponsoredFlag=false}
			}
		}
	}
	var I=_("Click here to add {0} to your page").format("<strong>"+F+"</strong>");
	if(A.campaignActive){I+=' <div class="sponsored-label">sponsored</div>'}
	////sbox要从这里启动
	var G=new Element("li",{"class":"widget"}).addEvent("mouseover",function(J){new App.toolTip(G,I)});
	if(A.campaignActive){G.addClass("sponsored")}
	var C=new Element("img",{"class":"icon"}).inject(G);
	C.src=E;
	new Element("a",{"class":"title",href:"javascript:void(0)",html:F}).inject(G);
	G.store("dataObj",A);
	return G
};
App.Panel.AddContent.breadcrumbs=function(D,B){
	var E=$("browseContentTitle");
	App.Panel.AddContent.sponsoredFlag=true;
	if(!arguments.callee._initialTitle){arguments.callee._initialTitle=E.get("html")}
	if(D){
		D.stop();
		var C=$(D.target).get("text")
	}else{if(typeof B=="string"){var C=B}else{return }}
	var A=arguments.callee._initialTitle;
	E.set("html",A+' <span class="breadcrumbs-separator">&gt;</span> <spanclass="breadcrumbs-section">'+C+"</span>")
};;

//44
App.Panel.Friends={};
App.Panel.Friends.tabs=null;
App.Panel.Friends.onShow=function(){App.Panel.element.empty();App.Panel.Friends.onLoading()};
App.Panel.Friends.onExecuteSearch=function(B){
	var A=this.tabs.getTabContent("Search");this.tabs.selectTab("Search");var D=new App.UI.FriendsViewer({path:"/rest/subscriptions",type:"search",params:{q:B}}).inject(A);var C=new Element("h2",{text:_("Results for {0}").format('"'+B+'"')}).inject(D.container.firstChild,"before");D.addEvent("onItemClick",function(E){if(App.UI.Profile.request&&App.UI.Profile.request.running){return false}if(E.hasClass("loading")){return false}var F=E.addClass("loading").retrieve("friendId");App.Panel.showProfile(F,function(){E.removeClass("loading")})})
};
App.Panel.Friends.onResetSearch=function(){this.tabs.getTabContent("Search").empty();if(this.tabs.selectedTab.getAttribute("name")=="Search"){this.tabs.selectTab("subscriptions")}};

App.Panel.Friends.onLoading=function(C){
	this.tabs=new Netvibes.UI.TabView({classTabList:"nav",classTabContent:"tabContent"});var B=App.Panel.buildSearchForm(this,{value:_("Search for contacts")});this.tabs.addTab("Search",{text:B}).onclick=null;$(this.tabs.addTab("subscriptions",{text:""})).getFirst().setHTML(_("Friends")+" <em>"+User.numFriends+"</em>");var A=$(this.tabs.addTab("followers",{text:""}));if(!User.username){A.addClass("fakeDisabled");A.getFirst().setHTML(_("Followers"))}else{A.getFirst().setHTML(_("Followers")+" <em>"+User.numFollowers+"</em>")}this.tabs.addTab("addFriends",{text:_("Find friends")});$(this.tabs.addTab("inviteFriends",{text:_("Invite friends"),disabled:true}));this.tabs.observe("activeTabChange",App.Panel.Friends.onActiveTabChanged);this.tabs.appendTo(App.Panel.element);this.tabs.selectTab("subscriptions",true)};
App.Panel.Friends.onActiveTabChanged=function(R){
	var M=App.Panel.Friends.tabs;var L=$(M.getTabContent(R));switch(R){case"subscriptions":if(!L.loaded){var B=new App.UI.FriendsViewer({user:"",type:"subscriptions"}).inject(L);L.store("viewer",B);var Q=new Element("h2",{text:_("My friends")}).inject(B.container.firstChild,"before");B.addEvent("onItemClick",function(S){if(App.UI.Profile.request&&App.UI.Profile.request.running){return false}if(S.hasClass("loading")){return false}var T=S.addClass("loading").retrieve("friendId");App.Panel.showProfile(T,function(){S.removeClass("loading")})});L.loaded=true}break;case"followers":if(!L.loaded){if(User.username){var B=new App.UI.FriendsViewer({user:"",type:"followers"}).inject(L);var Q=new Element("h2",{text:_("My followers")}).inject(B.container.firstChild,"before");B.addEvent("onItemClick",function(S){if(App.UI.Profile.request&&App.UI.Profile.request.running){return false}if(S.hasClass("loading")){return false}var T=S.addClass("loading").retrieve("friendId");App.Panel.showProfile(T,function(){S.removeClass("loading")})})}else{L.empty();new Element("h2",{text:_("Create your profile")}).inject(L);var G=new Element("p",{"class":"upgradeProfile",html:_("Your followers are people who subscribe to your activities.<br/>You can share with them your favorites articles, widgets or status.<br/><br/>To let people subscribe to your updates, you need to create your public page.")+"<br/><br/>"}).inject(L);new Element("input",{type:"button","class":"nv-button",value:_("Create my public page")}).addEvent("click",function(S){S.stop();App.showCreateUniverseWizard()}).inject(G)}L.loaded=true}break;case"addFriends":L=$(L);L.empty();L.addClass("addContent");L.addClass(R);var Q=new Element("h2",{text:_("Find Friends")}).inject(L);var I=new Element("div",{"class":"categoryScroll"}).inject(L);var E=new Element("ul",{"class":"categoryList"}).inject(I);var H=new Element("div",{"class":"categoryContent"}).inject(L);for(var K=0;K<App.Panel.Friends.Find.providers.length;K++){var N=App.Panel.Friends.Find.providers[K];if(N.disabled){var F=new Element("a").setText(N.title).inject(new Element("li",{"class":"category disabled"}).inject(E))}else{var F=new Element("a").setText(N.title).inject(new Element("li",{"class":"category"}).inject(E)).setProperty("index",K).addEvent("click",function(S){H.empty();$$("#nv-panel li.category").removeClass("selected");this.getParent().addClass("selected");App.Panel.Friends.Find.build(this.getProperty("index"),H)})}if(K==0){F.getParent().addClass("selected");App.Panel.Friends.Find.build(K,H)}}break;case"inviteFriends":L=$(L);L.empty();L.addClass("addContent");L.addClass(R);var P=encodeURIComponent(Cookie.get("activeSessionID"));var O=encodeURIComponent(Cookie.get("activeUserID"));var D=encodeURIComponent(Cookie.get("cs"));var J=encodeURIComponent(User.Profile.displayName);var C="?userId="+O+"&name="+J+"&sessionId="+P+"&cs="+D;var Q=new Element("h2",{text:_("Invite Friends")}).inject(L);var A=new Element("iframe",{"class":"inviteFriendsFrame",src:"http://ginger.netvibes.com/sendinvit.php"+C,frameborder:"0"}).inject(L);break;default:break}};
	
App.Panel.Friends.updateNumFriends=function(A){
	if(A&&A.success==true){User.numFriends=parseInt(User.numFriends)+1;App.Panel.Friends.tabs.getTab("subscriptions").getFirst().setHTML(_("Friends")+" <em>"+User.numFriends+"</em>");App.Panel.Friends.tabs.getTabContent("subscriptions").loaded=false}};
	
App.Panel.Friends.Invite={};
App.Panel.Friends.Invite.build=function(A){
	this.content=A;var A='<div id="divAddFriend">';A+='<form id="formInviteFriend" name="formInviteFriend" method="post">';A+="<h2>"+_("Invite your friends to join Netvibes")+"</h2>";A+=' <div id="contentInviteFriend">';A+=' <p class="field">';A+=' <label id="usernameAddFriendLabel" for="usernameAddFriend">'+_("E-mail addresses:")+"</label>";A+=' <input id="inviteFriendEmails" name="mail" type="text" class="text email" maxlength="200" />';A+=' <input style="padding:2px 5px;" type="submit" class="submit nv-button" id="submitInvitFriend" value="'+_("Invite friends")+'"/>';A+=" </p>";A+=' <p class="field">';A+=' <textarea id="inviteFriendBody" cols="50" rows="6">'+_("Hi,\n\nI would like to invite you to netvibes.com!")+"</textarea>";A+=" </p>";A+=" </div>";A+="</div>";this.content.innerHTML=A;App.Panel.Friends.Invite.attachEvents()
};
App.Panel.Friends.Invite.attachEvents=function(){
	$("formInviteFriend").onsubmit=(function(){new Request.JSON({secure:false,onComplete:App.Panel.Friends.Invite.checkReponse.bind(this)}).post("/ajax/friends/sendMail.php",{emails:document.forms.formInviteFriend.elements.inviteFriendEmails.value,body:document.forms.formInviteFriend.elements.inviteFriendBody.value});return false}).bind(this)};
App.Panel.Friends.Invite.checkReponse=function(B){
	var A=new Element("p");$("contentInviteFriend").empty();$("contentInviteFriend").adopt(A);if(typeof B=="undefined"||!B||typeof B.status=="undefined"||B.status!="success"){A.setHTML(_("An error occured while sending e-mail, please check the addresses or retry later"))}else{A.setHTML(_("The e-mail has been sent, thank you!"))}};
	
App.Panel.Friends.Find={};
App.Panel.Friends.Find.build=function(A,C){
	this.content=C;var D=App.Panel.Friends.Find.providers[A];var C="";C+='<div id="divAddFriend">';C+='<form id="formAddFriend" name="formAddFriend" method="post">';C+='<h3 style="background-image: url('+D.icon+')">'+(D.label||_("Find in your {0} contacts who is already on Netvibes").format(D.title))+"</h3>";C+='<input id="providerAddFriend" name="provider" type="hidden" value="'+D.id+'" />';if(D.hasEmail){var B="";if(typeof User.email!="undefined"&&(User.email.indexOf("@"+D.id+".")>0||D.forceInsertEmail==true)){B=User.email}C+='<p class="field">';C+='<label id="emailAddFriendLabel" for="emailAddFriend">'+(D.emailLabel||_("E-mail address:"))+"</label>";C+='<input id="emailAddFriend" name="email" type="text" class="text email" value="'+B+'" maxlength="200" />';C+="</p>"}if(D.hasLogin){C+='<p class="field">';C+='<label id="loginAddFriendLabel" for="loginAddFriend">'+(D.loginLabel||_("Login:"))+"</label>";C+='<input id="loginAddFriend" name="login" type="text" class="text email" maxlength="200" />';C+="</p>"}if(D.hasAddon){C+='<p class="field" id="findFriendsAddonContainer"></p>'}if(D.hasOther){C+='<p class="field">';C+='<label id="otherAddFriendLabel" for="otherAddFriend">'+(D.otherLabel||_("Other:"))+"</label>";C+='<input id="otherAddFriend" name="other" type="text" class="text" maxlength="200" />';C+="</p>"}if(D.hasPassword){C+='<p class="field">';C+='<label id="passwordAddFriendLabel" for="passwordAddFriend">'+(D.passwordLabel||_("Password:"))+"</label>";C+='<input id="passwordAddFriend" name="password" type="password" class="password" maxlength="200" />';C+="</p>"}C+='<p class="field">'+_("We won't store your login info or contact anyone without your permission.")+"</p>";C+="<p>";C+='<input style="padding:2px 5px;" type="submit" class="submit nv-button" id="submitAddFriend" value="'+_("Find friends")+'"/>';C+="</p>";C+="</form>";C+="</div>";this.content.innerHTML=C;if(D.hasAddon){D.addon($("findFriendsAddonContainer"))}App.Panel.Friends.Find.attachEvents()};
	
App.Panel.Friends.Find.attachEvents=function(){
	$("formAddFriend").onsubmit=(function(){var B={provider:$("formAddFriend").elements.provider.value};if(typeof $("formAddFriend").elements.email!="undefined"){B.email=$("formAddFriend").elements.email.value}if(typeof $("formAddFriend").elements.login!="undefined"){B.login=$("formAddFriend").elements.login.value}if(typeof $("formAddFriend").elements.password!="undefined"){B.password=$("formAddFriend").elements.password.value}if(typeof $("formAddFriend").elements.other!="undefined"){B.other=$("formAddFriend").elements.other.value}var A=new App.UI.FriendsViewer({path:"/ajax/friends/import.php",type:"find",params:B}).inject(this.content);A.addEvent("onItemClick",function(C){if(App.UI.Profile.request&&App.UI.Profile.request.running){return false}if(C.hasClass("loading")){return false}var D=C.addClass("loading").retrieve("friendId");App.Panel.showProfile(D,function(){C.removeClass("loading")})});return false}).bind(this)};
App.Panel.Friends.Find.providers=[
	{id:"gmail",title:_("GMail"),hasLogin:false,hasEmail:true,hasPassword:true,hasOther:false,icon:App.getStaticUrl("/img/panel/import/gmail.png")},{id:"yahoo",title:_("Yahoo! Mail"),hasLogin:false,hasEmail:true,hasPassword:true,hasOther:false,icon:App.getStaticUrl("/img/panel/import/yahoo.png")},{id:"hotmail",title:_("Hotmail / MSN"),hasLogin:false,hasEmail:true,hasPassword:true,hasOther:false,icon:App.getStaticUrl("/img/panel/import/hotmail.png")},{id:"twitter",title:_("Twitter"),hasLogin:true,hasEmail:false,hasPassword:false,hasOther:false,loginLabel:_("Twitter login:"),icon:App.getStaticUrl("/img/panel/import/twitter.png")},{id:"flickr",title:_("Flickr"),hasLogin:false,hasEmail:true,hasPassword:false,hasOther:false,forceInsertEmail:true,icon:App.getStaticUrl("/img/panel/import/flickr.png")},{id:"aim",title:_("AIM"),hasLogin:true,hasEmail:false,hasPassword:true,hasOther:false,loginLabel:_("Screen Name:"),icon:App.getStaticUrl("/img/panel/import/aim.png")},{id:"facebook",title:_("Facebook"),disabled:false,icon:App.getStaticUrl("/img/panel/import/facebook.png"),hasAddon:true,addon:function(C){var F;var E;function D(){F=window.open("/ajax/friends/facebook.php?action=login","Facebook","toolbar=no,status=no,width=646,height=436");if(F){E=setInterval(B,500)}}function B(){if(F.closed){clearInterval(E);A()}}function H(){$("submitAddFriend").hide();C.innerHTML="";var J=document.createElement("p");J.innerHTML=_("Please click below to log in to your Facebook account and start finding friends.");var K=document.createElement("a");K.href="#";K.onclick=D;var I=document.createElement("img");I.src="http://static.ak.facebook.com/images/devsite/facebook_login.gif";K.appendChild(I);C.appendChild(J);C.appendChild(K)}function G(){$("submitAddFriend").show();C.innerHTML="<p>"+_("You are authenticated with Facebook, you can now start finding your friends.")+"</p>";C.innerHTML+="<p>"+_("Note: If you are using a public computer don't forget to logout from Facebook after your found your friends.")+"</p>"}function A(){var I=Cookie.get("fb-uid");var J=Cookie.get("fb-session_key");if(typeof I!="undefined"&&I&&typeof J!="undefined"&&J){G()}else{H()}}A()}}];;

//45
App.Panel.Timeline={};
App.Panel.Timeline.onShow=function(){App.Panel.Timeline.onLoading()};
App.Panel.Timeline.onLoading=function(B){
	App.Panel.element.empty();App.Panel.Timeline.tabs=new Netvibes.UI.TabView({position:"left",classTabList:"nav",classTabContent:"tabContent",allowReload:true});App.Panel.Timeline.searchForm=App.Panel.buildSearchForm(this,{value:_("Search for activities")});App.Panel.Timeline.tabs.addTab("Search",{text:App.Panel.Timeline.searchForm}).onclick=null;App.Panel.Timeline.tabs.addTab("privateTimeline",{text:_("My private activity")});var A=$(App.Panel.Timeline.tabs.addTab("publicTimeline",{text:_("My public activity")}));if(!User.username){A.addClass("fakeDisabled")}App.Panel.Timeline.tabs.addTab("friendsTimeline",{text:_("Friends activity")});App.Panel.Timeline.tabs.observe("activeTabChange",App.Panel.Timeline.onActiveTabChanged);App.Panel.Timeline.tabs.selectTab("friendsTimeline");App.Panel.Timeline.tabs.appendTo(App.Panel.element)};
App.Panel.Timeline.onExecuteSearch=function(A){App.Panel.Timeline.tabs.selectTab("Search")};
App.Panel.Timeline.onActiveTabChanged=function(A){
	var D=$(App.Panel.Timeline.tabs.getTabContent(A));if(!D.loaded){D.empty();D.addClass(A);if(typeof App.Panel.Timeline.current!="undefined"){delete (App.Panel.Timeline.current)}var H=App.Panel.Timeline.tabs.getTab(A).getFirst().get("text");var F=new Element("h2",{text:H}).inject(D);switch(A){case"Search":var G=App.Panel.Timeline.searchForm.firstChild.value;F.set("text",_("Search for")+" "+G);var E={format:"atom",query:G};var B="http://www2.netvibes.com/rest/timeline/search?"+Hash.toQueryString(E);var I=new Element("span",{"class":"widget feed",href:B}).store("richIcon","http://eco.netvibes.com/img/thumbnail/ginger/nopreview-64-48.png.feed.png").store("dataObj",{moduleName:"RssReader",title:"",data:{feedUrl:B}}).injectInside(F);new Element("img",{"class":"icon",src:"/img/feed.png"}).inject(I);new Element("a",{"class":"title",text:_("Keep track on this search"),href:"javascript:void(0)"}).inject(I);App.Panel.AddContent.attachWidgetEvents();App.Panel.Timeline.current=new Netvibes.UI.Timeline({id:"searchTimeline",search:G});break;case"friendsTimeline":App.Panel.Timeline.current=new Netvibes.UI.Timeline({id:"friendsTimeline",search:Netvibes.UI.Timeline.Query.friends});break;case"privateTimeline":App.Panel.Timeline.current=new Netvibes.UI.Timeline({id:"privateTimeline",search:Netvibes.UI.Timeline.Query["private"]});break;case"publicTimeline":if(User.username){App.Panel.Timeline.current=new Netvibes.UI.Timeline({id:"publicTimeline",search:Netvibes.UI.Timeline.Query["public"]})}else{App.Panel.Timeline.current=false}break}if(App.Panel.Timeline.current){D.appendChild(App.Panel.Timeline.current.getElement())}else{F.set("text",_("Create your profile"));var C=new Element("p",{"class":"upgradeProfile",html:_("Your public activity is a stream your followers can subscribe to.<br/>By making them public, you can share your favorites articles, widgets or status.<br/><br/>To activate your public activity, you need to create your public page.")+"<br/><br/>"}).inject(D);new Element("input",{type:"button","class":"nv-button",value:_("Create my public page")}).addEvent("click",function(J){J.stop();App.showCreateUniverseWizard()}).inject(C)}}};;

//46
App.Panel.Profile={};App.Panel.Profile.onShow=function(){App.Panel.element.empty();if(!User.username&&!App.visit){App.Panel.MyUniverse.buildTeaser();return }App.Panel.Profile.show((App.visit&&App.visit.id&&!App.visit.my)?User.Profile.id:"my")};App.Panel.Profile.show=function(A){App.Panel.element.empty();var B=new App.UI.Profile(App.Panel.element).show(A)};;

//47
App.Panel.MyUniverse={};
App.Panel.MyUniverse.onShow=function(){App.Panel.element.empty();App.Panel.MyUniverse.onLoading()};
App.Panel.MyUniverse.onLoading=function(F){
	if(!User.username){App.Panel.MyUniverse.buildTeaser();return }if(User.username){var A=new Element("div",{id:"universeContent"}).inject(App.Panel.element);var C=new Element("div",{"class":"universeContent"}).inject(A);var G=new Element("h2",{text:_("Your universe is awaiting your validation")}).inject(C);var E=new Element("p").interpolate(_("Check the inbox of your e-mail: {email}"),{email:User.email}).inject(C);var D=new Element("p",{text:_("If the e-mail was not delivered, we can send it again.")}).inject(C);var B=new Element("button",{"class":"nv-button",text:_("Send a confirmation e-mail again")}).inject(C);B.addEvent("click",function(){this.setText(_("Sending..."));var H=this;new Request({onComplete:function(I){H.innerHTML=I}}).get("/ajax/universe/sendMail.php")})}};
App.Panel.MyUniverse.buildTeaser=function(){
	var A="";A+='<div id="createPublicPageTeaser">';A+='<div class="teaser">';A+="<h2>"+_("Create your Public netvibes")+"</h2>";A+="<p>"+_("Create your Public netvibes to share your favorites widgets with your friends (facebook, blogs, games, video, photos, etc...) so they can access all your updated news and add them in one click on their own netvibes page!")+"</p>";A+='<p><input id="createYourPublicPageNow" class="nv-button" type="button" value="'+_("Create my public page")+'" /></p>';A+="</div>";A+='<div class="examples">';A+='<img src="'+App.getStaticUrl("/img/publicpage-01.png")+'" alt="" />';A+='<img src="'+App.getStaticUrl("/img/publicpage-02.png")+'" alt="" />';A+='<img src="'+App.getStaticUrl("/img/publicpage-03.png")+'" alt="" />';A+="</div>";A+="</div>";App.Panel.element.set("html",A);$("createYourPublicPageNow").onclick=function(){App.showCreateUniverseWizard();return false}};;

//48
Netvibes.Starring={};
Netvibes.Starring.showPopup=function(B){
	var A=new App.UI.ConfirmDialog.Starring(B,{}).show()
};;

//49
App.FeedReader={};
App.FeedReader.isOpen=false;
App.FeedReader.headlinesTD=220;
App.FeedReader.contentViewPortHeight=false;
App.FeedReader.resize=function(){
	if($("feedReaderContentFrame")==null||!App.FeedReader.isOpen){return false}
	var A=document.body.clientWidth-10-9;
	App.FeedReader.elm.style.width=A+"px";
	App.FeedReader.elm.style[App.FeedReader.dirRTL==true?"right":"left"]="9px";
	var F=A-App.FeedReader.headlinesTD-28;
	var D=$("feedReaderContentFrame");
	var C=(Browser.isOpera)?document.body.clientHeight:((Browser.isSafari)?window.innerHeight:document.documentElement.clientHeight);
	var B=findPosY($("maintable"));
	var E=(C-B-60);E=(E>300?E:260)+"px";
	var G=E;D.style.height=E;
	$("feedReaderHeadlinesFrame").style.height=G;
	$("tooltip").style.display="none";
	if(D.getElementsByTagName("iframe")[0]){
		D.getElementsByTagName("iframe")[0].style.width=F+"px";D.getElementsByTagName("iframe")[0].style.height=E
	}
};
App.FeedReader.position=function(){
	var B=App.FeedReader.elm;
	var A=$("maintable")
};
App.FeedReader.close=function(){
	var C=App.FeedReader.elm;
	C.innerHTML="";
	C.style.display="none";
	App.FeedReader.isOpen=false;
	App.keyboardFocus="module";
	App.retainKeyboardFocus();
	$("columns").show();
	$("footer").style.display="block";
	var B=$("application").getElementsByClassName("flashplayer");
	for(var A=0;A<B.length;A++){B[A].style.display="block"}
	document.body.scrollTop=App.FeedReader.oldScroll;
	document.documentElement.scrollTop=App.FeedReader.oldScroll;
	if(typeof App.searchBoxInput!="undefined"){
		App.searchBoxInput.disabled=""
	}
	App.FeedReader.data.contentObj.setAutoRefreshState(true)
};
App.FeedReader.updateReadCount=function(){
	var A=App.Rss.getHistoryNbNew(
		App.FeedReader.data.moduleLocalData.feed,
		App.FeedReader.data.moduleLocalData.feed.items.length
	);
	if(!App.isOnSearch){
		App.FeedReader.countStatus.innerHTML=(A==0)?"":'&nbsp;&nbsp;<span class="unread">('+A+")</span>"
	}else{
		App.FeedReader.countStatus.innerHTML=""
	}
};
App.FeedReader.display=function(j){
	App.FeedReader.data=j;
	App.FeedReader.data.contentObj.setAutoRefreshState(false);
	App.FeedReader.dirRTL=(j.moduleLocalData.feed.dir&&j.moduleLocalData.feed.dir=="rtl")?true:false;
	if(typeof App.Panel!="undefined"){App.Panel.close()}
	if(document.body.scrollTop){
		App.FeedReader.oldScroll=document.body.scrollTop
	}else{App.FeedReader.oldScroll=document.documentElement.scrollTop}
	if(typeof App.searchBoxInput!="undefined"){
		App.searchBoxInput.disabled="disabled"
	}
	scrollTo(0,0);$("columns").hide();
	$("footer").style.display="none";
	var J=$("application").getElementsByClassName("flashplayer");
	for(var d=0;d<J.length;d++){J[d].style.display="none"}
	var Q=j.moduleLocalData.feed.htmlUrl||"";
	var G;var U=Q.lastIndexOf("/");
	if(U!=6){Q=Q.substring(0,U)}
	var D=Q.substring(0,Q.indexOf("/",7));
	if(!D){D=Q}
	var g=App.FeedReader.elm;
	if(App.FeedReader.dirRTL==true){
		Element.addClassName(g,"rtl");Element.removeClassName(g,"ltr");g.dir="rtl"
	}else{
		Element.addClassName(g,"ltr");Element.removeClassName(g,"rtl");g.dir="ltr"
	}
	var Y=document.createElement("div");
	Y.id="feedReaderFrame";App.FeedReader.position();g.style.display="block";
	var A=document.createElement("div");A.className="frame";
	var B=document.createElement("div");B.className="header";
	if(App.FeedReader.dirRTL==true){
		B.innerHTML=Netvibes.UI.createIcon("actions-window-close",_("Close"),15,15,true)+'<div class="readAll rtl"><div><div id="FeedreaderReadAll" >'+_("Read All").replace(/(a)/i,"<u>$1</u>")+'</div></div></div><div class="readAll rtl"><div><div id="FeedreaderUnReadAll" >'+_("Unread All").replace(/(u)/i,"<u>$1</u>")+'</div></div></div><div id="feedReaderCountStatus" style="float:right">(undefined)</div><h2><a href="'+j.moduleLocalData.feed.htmlUrl+'" target="_blank">'+j.title.escapeHTML()+'</a></h2><div class="readAll" style="float: left;margin-top:-15px;position:relative;left:20px;clear:left"><div><div id="btShowPage" dir="ltr"></div></div></div>'
	}else{
		B.innerHTML=Netvibes.UI.createIcon("actions-window-close",_("Close"),15,15,true)+'<div class="readAll ltr"><div><div id="FeedreaderReadAll">'+_("Read All").replace(/(a)/i,"<u>$1</u>")+'</div></div></div><div class="readAll ltr"><div><div id="FeedreaderUnReadAll">'+_("Unread All").replace(/(u)/i,"<u>$1</u>")+'</div></div></div><div id="feedReaderCountStatus" style="float:left; cursor: pointer">(undefined)</div><h2><a href="'+j.moduleLocalData.feed.htmlUrl+'" target="_blank">'+j.title.escapeHTML()+'</a></h2><div class="readAll" style="float: right;margin-top:-15px;margin-right:27px"><div><div id="btShowPage"></div></div></div>'
	}
	App.FeedReader.readAll=function(){b(true)};
	var N=B.firstChild.nextSibling.firstChild.firstChild;N.onclick=App.FeedReader.readAll;
	var I=B.childNodes[3];I.onclick=App.FeedReader.readAll;
	var R=B.childNodes[2].firstChild.firstChild;R.onclick=function(){b(false)};
	var E=B.childNodes[5].firstChild.firstChild;
	if(!j.contentObj.getShowPage()||j.contentObj.getShowPage()==0){
		E.innerHTML=_("Show website");
		var F=false
	}else{
		E.innerHTML=_("Go back to the feed view");
		var F=true
	}
	E.onclick=function(){
		if(this.innerHTML==_("Show website")){
			this.innerHTML=_("Go back to the feed view");V();j.contentObj.setShowPage(1)
		}else{
			this.innerHTML=_("Show website");
			var i=L.firstChild;i.removeChild(M);i.firstChild.style.display="";i.scrollTop=C;C=-1;j.contentObj.setShowPage(0)
		}
		j.moduleObj.save()
	};
	E.style.cursor="pointer";B.firstChild.style.cursor="pointer";
	if(Browser.isIE){
		if(App.FeedReader.dirRTL==true){B.firstChild.style.styleFloat="left"}else{B.firstChild.style.styleFloat="right"}
	}else{
		if(App.FeedReader.dirRTL==true){B.firstChild.style.cssFloat="left"}else{B.firstChild.style.cssFloat="right"}
	}
	B.firstChild.onclick=function(){App.FeedReader.close()};
	var f=document.createElement("div");
	f.id="feedReaderFrame2";f.innerHTML='<table id="readerTable" cellpadding="0" cellspacing="0" width="100%"><tr><td></td><td></td><td></td></tr></table>';
	var k=f.firstChild.firstChild.firstChild;
	var P=k.childNodes[0];P.className="tdHeadlines";P.style.width=App.FeedReader.headlinesTD+"px";
	var Z=k.childNodes[1];Z.className="tdSeparator";
	var L=k.childNodes[2];L.className="tdContent";
	L.innerHTML='<div id="feedReaderContentFrame"><div class="contentInsideFrame"></div></div>';
	function K(o,n,m){
		var p=o.firstChild.firstChild.firstChild.firstChild;
		var i=o.lastChild.firstChild.firstChild.firstChild;
		p.onmouseover=i.onmouseover=function(){this.style.color="#F60"};
		p.onmouseout=i.onmouseout=function(){this.style.color="#333"};
		p.onclick=function(){App.launchPlayer(n,m)}
	}
	function S(p,v,m){
		function r(AE,AD,AF){
			if(typeof AF=="undefined"){AF=false}var z=AE.getAttribute(AD);if(z==null){return }if(Browser.isIE&&(z.indexOf("http://"+NV_HOST)==0)){AE.setAttribute(AD,z.replace("http://"+NV_HOST,D))}if(z.indexOf("http://")==0){return }if(z.indexOf("https://")==0){return }if(AF&&z.indexOf("mailto:")==0){return }if(z.substring(0,1)=="/"){AE.setAttribute(AD,D+z);return }if(Q.substring(0,1)=="/"){AE.setAttribute(AD,Q+z);return }AE.setAttribute(AD,Q+"/"+z)
		}
		var u=p.getElementsByTagName("img");
		var y=u.length;
		for(var AA=0;AA<y;AA++){
			u[AA].onload=function(){if(!this.currentStyle){return }if(this.currentStyle.width){this.style.width=this.currentStyle.width}if(this.currentStyle.height){this.style.height=this.currentStyle.height}};r(u[AA],"src")
		}
		var q=p.getElementsByTagName("script");
		var y=q.length;
		for(var AA=y-1;AA>0;AA--){
			if(!q[AA]){break}if(typeof q[AA].removeNode=="function"){q[AA].removeNode(true)}else{try{Element.remove(q[AA])}catch(x){}}
		}
		var AC=p.getElementsByTagName("style");
		var y=AC.length;
		for(var AA=0;AA<y;AA++){Element.remove(AC[AA])}
		if(App.isOnSearch){p.innerHTML=String.highlight(p.innerHTML,App.query)}
		var AB=p.getElementsByTagName("a");
		var y=AB.length;
		for(var AA=0;AA<y;AA++){
			var t=AB[AA].firstChild;if(t){if(t.nodeType==1){if(t.nodeName=="IMG"||t.nodeName=="img"){AB[AA].className="noBottomLine"}}}r(AB[AA],"href",true);AB[AA].setAttribute("target","_blank")
		}
		if(m.enclosures){
			var y=m.enclosures.length;
			for(var AA=0;AA<y;AA++){
				if(m.enclosures[AA].type.substr(0,10)=="audio/mpeg"||m.enclosures[AA].type=="audio/mp3"){
					var o=m.enclosures[AA].url;var i=document.createElement("div");i.className="podcast";i.innerHTML='<table cellpadding="0" cellspacing="0"><tr><td><div class="listen"><div><div>'+_("LISTEN")+'</div></div></div></td><td>&nbsp;</td><td><a href="'+o+'"><div class="download"><div><div>'+_("DOWNLOAD")+"</div></div></div></a></td></tr></table>";K(i,o,v.firstChild.firstChild.nextSibling.innerHTML);if(p.firstChild){p.insertBefore(i,p.firstChild)}else{p.appendChild(i)}
				}else{
					if(m.enclosures[AA].type=="image/jpeg"||m.enclosures[AA].type=="image/gif"||m.enclosures[AA].type=="image/png"){var o=m.enclosures[AA].url;if(p.innerHTML.toLowerCase().indexOf(o.toLowerCase())<0){var i=document.createElement("div");i.className="photofeed";i.innerHTML='<img src="'+o+'" />';if(p.firstChild){p.insertBefore(i,p.firstChild)}else{p.appendChild(i)}}}else{if(m.enclosures[AA].type=="video/mp4"||m.enclosures[AA].type=="video/quicktime"){var o=m.enclosures[AA].url;var i=document.createElement("div");i.className="videopodcast";var s=document.createElement("obj");s.setAttribute("classid","clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B");s.setAttribute("codebase","http://www.apple.com/qtactivex/qtplugin.cab");s.width=320;s.height=270;s.style.width=s.width+"px";s.style.height=s.height+"px";var n=document.createElement("param");n.name="src";n.value=o;s.appendChild(n);n=document.createElement("param");n.name="controller";n.value="true";s.appendChild(n);n=document.createElement("param");n.name="autoplay";n.value="false";s.appendChild(n);var w=document.createElement("embed");w.width=320;w.height=270;w.style.width=w.width+"px";w.style.height=w.height+"px";w.setAttribute("pluginspage","http://www.apple.com/quicktime/download/");w.setAttribute("src",o);w.setAttribute("controller","true");w.setAttribute("scale","TOFIT");w.setAttribute("autoplay","false");w.setAttribute("type","video/quicktime");s.appendChild(w);i.appendChild(s);if(p.firstChild){p.insertBefore(i,p.firstChild)}else{p.appendChild(i)}}
					}
				}
			}
		}
	}
	var M;var C=-1;
	function V(){
		if(C>=0){if(M.src!=G){M.src=G}}else{var i=L.firstChild;i.style.position="relative";M=document.createElement("iframe");M.style.border="none";M.src=G;M.style.position="absolute";M.style.top="0px";M.style.left="0px";M.style.background="white";var m=Element.getDimensions(i);M.style.width=m.width+"px";M.style.height=m.height+"px";C=i.scrollTop;i.firstChild.style.display="none";i.appendChild(M)}
	}
	function a(q,m){
		if(typeof m=="undefined"){m=false}
		if(!m){App.rssItemOnDisplay=q}
		var i=j.moduleLocalData.feed.items[q];
		var n=document.createElement("div");
		n.className="title";
		var p=i.link;
		if(p.indexOf("://")==-1){
			if(i.enclosures){var r=i.enclosures.length;for(var s=0;s<r;s++){if(i.enclosures[s].type.substr(0,6)=="audio/"||i.enclosures[s].type.substr(0,6)=="video/"||i.enclosures[s].type.substr(0,6)=="image/"){p=i.enclosures[s].url;break}}}
		}
		if(!m){G=p}
		if(App.isOnSearch){
			var u;u="<h2>";u+='<a href="'+p+'" class="external" rel="external" target="_blank">'+_("link")+"&raquo;</a>";u+='<a href="'+p+'" rel="external" target="_blank">'+String.highlight(i.title.stripTags().escapeHTML(),App.query)+"</a>";u+="</h2>";u+="<p>"
		}else{
			var u;u="<h2>";u+='<a href="'+p+'" class="external" rel="external" target="_blank">'+_("link")+"&raquo;</a>";u+='<a href="'+p+'" rel="external" target="_blank">'+i.title.stripTags().escapeHTML()+"</a>";u+="</h2>";u+="<p>"
		}
		if(i.author){
			u+='<span class="author">'+i.author+"</span>, "
		}
		if(i.date){u+='<span class="date">'+i.date+"</span>"}
		u+="</p>";n.innerHTML=u;
		var o=document.createElement("div");
		o.className="feedContent";
		if(typeof i.shortItem!="undefined"&&i.shortItem!=null&&i.shortItem!=""){
			o.innerHTML=i.content+"<br /><br />("+_("Loading ...")+")"
		}else{o.innerHTML=i.content}
		S(o,n,i);L.firstChild.firstChild.appendChild(n);L.firstChild.firstChild.appendChild(o);
		if(typeof i.shortItem!="undefined"&&i.shortItem!=null&&i.shortItem!=""){
			App.Request.sendGET(j.proxy+"&item="+i.shortItem,function(t){if((typeof t.getResponseHeader=="function"||typeof t.getResponseHeader=="unknown")&&t.getResponseHeader("Content-type").substr(0,9)!="text/html"){return false}if(t.responseText.substr(0,1)=="{"){return false}i.shortItem=null;i.content=t.responseText;if(!m&&App.rssItemOnDisplay!=q){return false}o.style.visibility="hidden";o.innerHTML=i.content;S(o,n,i);o.style.visibility="visible"})
		}
	}
	function c(){
		var i=L.firstChild;
		i.firstChild.innerHTML="";
		if(C<0&&L.getElementsByTagName("iframe")&&L.getElementsByTagName("iframe")[0]){
			i.removeChild(M);i.firstChild.style.display=""
		}else{
			if(C>=0){i.firstChild.style.display="none"}
		}
		App.FeedReader.resize();
		return 
	}
	function X(){
		var m=document.createElement("a");
		L.firstChild.firstChild.insertBefore(m,L.firstChild.firstChild.firstChild);
		try{L.firstChild.firstChild.firstChild.focus()}catch(i){}
	}
	function e(p,u,i){
		var w=L.firstChild.firstChild;var v=O.scrollTop;var m=O.childNodes[p].offsetTop;var n=Element.getDimensions(O.childNodes[p]).height;var t=Element.getDimensions(O).height;if(m-v+n>t-25){App.smoothScroll(O,m+n-t+60)}else{if(m-v<25){App.smoothScroll(O,m-60)}}if(typeof i=="undefined"){i=true}i=(i)?1:0;var q=O.childNodes.length;for(var r=0;r<q;r++){O.childNodes[r].setAttribute("isSelected",0);if(Element.hasClassName(O.childNodes[r],"selected")){Element.removeClassName(O.childNodes[r],"selected")}}c();O.childNodes[p].setAttribute("isSelected",1);if(!Element.hasClassName(O.childNodes[p],"selected")){Element.addClassName(O.childNodes[p],"selected")}a(p);L.firstChild.scrollTop=0;X();if(u){if(UWA.Services.FeedHistory.isRead(j.moduleLocalData.feed,p)!=i){if(i==true){UWA.Services.FeedHistory.setRead(j.moduleLocalData.feed,p)}else{UWA.Services.FeedHistory.setUnRead(j.moduleLocalData.feed,p)}if(i){Element.removeClassName(O.childNodes[p],"unread");Element.addClassName(O.childNodes[p],"read");if(j.contentObj.getItemNode(p)){Element.removeClassName(j.contentObj.getItemNode(p),"unread");Element.addClassName(j.contentObj.getItemNode(p),"read")}}else{Element.removeClassName(O.childNodes[p],"read");Element.addClassName(O.childNodes[p],"unread");if(j.contentObj.getItemNode(p)){Element.removeClassName(j.contentObj.getItemNode(p),"read");Element.addClassName(j.contentObj.getItemNode(p),"unread")}}j.contentObj.setHistory(App.Rss.getHistoryString(j.moduleLocalData.feed));j.moduleObj.saveHistory();j.contentObj.setFeedTitle();App.FeedReader.updateReadCount()}}if(C>=0){C=0;V()}
	}
	function b(p){
		c();var m=L.firstChild.firstChild;var n=O.childNodes.length;for(var o=0;o<n;o++){if(p){O.childNodes[o].setAttribute("isSelected",1);Element.addClassName(O.childNodes[o],"selected");Element.removeClassName(O.childNodes[o],"unread");Element.addClassName(O.childNodes[o],"read");UWA.Services.FeedHistory.setRead(j.moduleLocalData.feed,o);a(o,true);var i=document.createElement("div");i.className="postSeparator";m.appendChild(i)}else{O.childNodes[o].setAttribute("isSelected",0);Element.removeClassName(O.childNodes[o],"selected");Element.removeClassName(O.childNodes[o],"read");Element.addClassName(O.childNodes[o],"unread");UWA.Services.FeedHistory.setUnRead(j.moduleLocalData.feed,o)}}L.firstChild.scrollTop=0;X();j.contentObj.setHistory(App.Rss.getHistoryString(j.moduleLocalData.feed));j.moduleObj.saveHistory();j.contentObj.setAllAsRead();App.FeedReader.updateReadCount();G=j.moduleLocalData.feed.htmlUrl;if(C>=0){C=0;V()}
	}
	var O=document.createElement("div");O.id="feedReaderHeadlinesFrame";
	var T=j.moduleLocalData.feed.items.length;
	for(var W=0;W<T;W++){
		var H=j.moduleLocalData.feed.items[W];var l=document.createElement("div");l.setAttribute("itemId",H.id);l.setAttribute("itemIndex",W);l.className="headline";l.onmouseover=function(){};l.onmouseout=function(){};l.onclick=function(m){var i=UWA.Services.FeedHistory.isRead(j.moduleLocalData.feed,this.getAttribute("itemIndex"));i=!(this.getAttribute("isSelected")==1&&i);e(this.getAttribute("itemIndex"),true,i);if(UWA.Services.FeedHistory.isRead(j.moduleLocalData.feed,this.getAttribute("itemIndex"))){Element.addClassName(this,"read")}else{Element.addClassName(this,"unread")}};if(!App.isOnSearch){l.innerHTML='<a href="'+H.link+'" onclick="return false;">'+H.title.stripTags().escapeHTML()+"</a>"}else{l.innerHTML='<a href="'+H.link+'" onclick="return false;">'+String.highlight(H.title.stripTags().escapeHTML(),App.query)+"</a>"}if(typeof j.moduleObj.addStar=="function"){var h=document.createElement("img");h.className="star";h.src="/img/s.gif";h.height=16;h.width=16;h.style.display="none";h.onclick=function(i){if(!i){var i=window.event}j.moduleObj.addStar({title:this.feedItem.title,url:this.feedItem.link});Event.stop(i)}.bindAsEventListener({feedItem:H});l.insertBefore(h,l.firstChild);l.onmouseover=function(){this.style.display="block"}.bindAsEventListener(h);l.onmouseout=function(){this.style.display="none"}.bindAsEventListener(h)}if(UWA.Services.FeedHistory.isRead(j.moduleLocalData.feed,W)){Element.addClassName(l,"read")}else{Element.addClassName(l,"unread")}if(App.isOnSearch&&H.isResult!="1"){Element.addClassName(l,"transparent")}O.appendChild(l)
	}
	P.appendChild(O);
	A.appendChild(B);
	A.appendChild(f);
	Y.appendChild(A);
	g.innerHTML="";
	g.appendChild(Y);X();
	if(App.staticUniverse){$("feedReaderCountStatus").style.display="none"}
	App.FeedReader.isOpen=true;
	App.FeedReader.countStatus=B.childNodes[3];
	App.FeedReader.updateReadCount();
	App.FeedReader.resize();
	if(F){L.firstChild.firstChild.style.display="none"}
	e(j.selectedItemIndex,false);
	if(F){V()}
	setTimeout(App.FeedReader.resize,100)
};;

//50
if(typeof Netvibes=="undefined"||!Netvibes){var Netvibes={}}
var NEW='<img src="'+NV_PATH+'img/icons/new.gif" style="border: 0; margin-top: -5px;margin-left:2px" />';
Netvibes.Settings=[];
Netvibes.Settings.push({name:"general",title:_("General settings"),type:"Netvibes.Settings.General",enabled:1});
Netvibes.Settings.push({name:"country",title:_("Local Content"),type:"Netvibes.Settings.LocalContent",enabled:true});
Netvibes.Settings.push({name:"language",title:_("Languages"),type:"Netvibes.Settings.Language",enabled:2});
Netvibes.Settings.push({name:"theme",title:_("Themes")+NEW,type:"Netvibes.Settings.Theme",enabled:2});
Netvibes.Settings.push({name:"wallpaper",title:_("Wallpapers"),type:"Netvibes.Settings.Wallpaper",enabled:2});
Netvibes.SettingsPanel=new Class({
	Extends:ModalDialog,
	initialize:function(element,options){
		if($(element)!=null){$(element).innerHTML=""}
		this.parent(element,options);
		this.pages=[];
		this.selectedIndex=0;
		this.listElement=null;
		this.paneElement=null;
		this.heading.innerHTML=_("Settings");
		this.listElement=document.createElement("ol");
		this.listElement.className="settings";
		for(var i=0,setting;setting=Netvibes.Settings[i];i++){
			if(setting.name=="user"&&App.registeredUser!=true){continue}
			var item=document.createElement("li");
			item.className=setting.name;
			var link=document.createElement("a");
			link.href="javascript:void(0)";
			link.innerHTML=setting.title;
			link.setAttribute("hidefocus","hidefocus");
			link.setAttribute("selectedIndex",i);
			item.appendChild(link);
			this.listElement.appendChild(item);
			if(setting.enabled){
				link.onclick=this.onSelectionChanged.bindAsEventListener(this);
				this.pages.push({name:setting.name,index:i,manager:eval("new "+setting.type),contentNode:null})
			}else{link.className="disabled"}
		}
		this.container.appendChild(this.listElement);this.paneElement=document.createElement("div");this.paneElement.className="page";this.container.appendChild(this.paneElement);var bottomDiv=document.createElement("div");bottomDiv.className="bottom";this.container.appendChild(bottomDiv);var inputDone=document.createElement("input");inputDone.type="button";inputDone.className="done";inputDone.value=_("Done");inputDone.onclick=this.hide.bindAsEventListener(this);bottomDiv.appendChild(inputDone)
	},
	getContent:function(){},
	getPageIndex:function(A){
		if(typeof A=="string"){return Netvibes.Settings.detect(function(B){return B.name==A})}return A
	},
	setCurrentPage:function(C){
		if(typeof (C)=="string"&&C.length>3){var D=this.pages.detect(function(I){return I.name==C});C=D?D.index:0}
		this.selectedIndex=C;
		$A(this.listElement.getElementsByTagName("a")).each(function(J,I){
			if(J.getAttribute("selectedIndex")==C){Element.addClassName(J,"selected")}else{Element.removeClassName(J,"selected")}
		});
		for(var B=0,E;E=this.pages[B];B++){
			if(E.index==C){
				if(E.contentNode==null||E.manager.forceLoad){
					E.contentNode=E.manager.load();
					this.paneElement.appendChild(E.contentNode);
					if(typeof (E.manager.loaded)=="function"){E.manager.loaded()}
				}
				if(!Element.hasClassName(this.paneElement,E.name)){this.paneElement.className="page "+E.name}
				Element.show(E.contentNode);
				if(typeof (E.manager.activate)=="function"){try{E.manager.activate()}catch(H){}}
				var A=$("nv-overlay");
				overlayLower=false;
				overlayHigher=false;
				if(!Browser.isIE&&A.style.opacity==""){
					A.style.opacity="0.4"
				}else{if(Browser.isIE&&A.style.filter==""){A.style.filter="alpha(opacity=40)"}}
				if(E.name=="theme"||E.name=="wallpaper"){
					function G(){
						if(!overlayLower){return }
						if((!Browser.isIE&&(parseFloat(A.style.opacity)>0))||(Browser.isIE&&(parseInt(A.style.filter.substr(14,2))>0))){
							if(Browser.isIE){
								A.style.filter="alpha(opacity="+(parseInt(A.style.filter.substr(14,2))-2)+")"
							}else{A.style.opacity=(parseFloat(A.style.opacity)-0.02)}
							window.setTimeout(G,100)
						}
					}
					overlayLower=true;
					G()
				}else{
					function F(){
						if(!overlayHigher){return }
						if((!Browser.isIE&&(parseFloat(A.style.opacity)<0.4))||(Browser.isIE&&(parseInt(A.style.filter.substr(14,2))<40))){
							if(Browser.isIE){
								A.style.filter="alpha(opacity="+(parseInt(A.style.filter.substr(14,2))+2)+")"
							}else{A.style.opacity=(parseFloat(A.style.opacity)+0.02)}
							window.setTimeout(F,100)
						}
					}
					overlayHigher=true;
					F()
				}
			}else{if(E.contentNode){Element.hide(E.contentNode)}}}
	},
	onSelectionChanged:function(C){var B=Event.findElement(C,"A");var A=B.getAttribute("selectedIndex");this.setCurrentPage(A)},
	onShow:function(){App.keyboardFocus="settings"},
	onClose:function(){
		App.keyboardFocus="module";var C=Netvibes.Settings.Language.selectedLang;var B=false;var D=(/^[a-z]{2}(_[A-Z]{2,5}){0,2}$/.test(C)&&C!=App.lang);
		if(D){
			var A=NV_PATH+"?lang="+C+(B?"&locale="+newRegion:"");
			if(App.visit&&App.visit.username.length>0){A+="&visit="+App.visit.username}
			window.location.href=A
		}
	}
});
	
window._settingsPanel=null;
var SettingsPanel={};
SettingsPanel.open=function(A){
	if(window._settingsPanel==null){
		window._settingsPanel=new Netvibes.SettingsPanel("nv-settings",{overlayClassName:"overlay_settings"})
	}
	window._settingsPanel.setOptions({onClosed:Function.empty,fadeEffect:(App.userCustom.enableFx=="1")});
	window._settingsPanel.show();
	if(typeof A=="undefined"){A=window._settingsPanel.selectedIndex||0}
	window._settingsPanel.setCurrentPage(A)
};
SettingsPanel.close=function(){if(window._settingsPanel){window._settingsPanel.hide()}};
SettingsPanel.isOpen=function(){return(window._settingsPanel&&window._settingsPanel.isVisible())};
Netvibes.SetAsStartPage=new Class({
	Extends:ModalDialog,
	initialize:function(B,A){
		this.parent(B,A);this.setTitle(_("Set Netvibes as your startpage"));this.getContent()
	},
	getContent:function(){
		this.content=document.createElement("div");
		Element.addClassName(this.content,"page");
		var C="";
		if(Browser.isFirefox){
			C+="<p>Open Firefox options, go to 'Main' and click on 'Use current page'.</p>";
			C+="<p style='text-align:center'><img src='img/help/startpage/win-ffx-01.png' /> <img src='img/help/startpage/win-ffx-02.png' /></p>"
		}else{
			if(Browser.isSafari){
				C+="<p>Open Safari preferences, go to 'General' and click on 'Set to current page'.</p>";
				C+="<p style='text-align:center'><img src='img/help/startpage/safari1.png' /> <img src='img/help/startpage/safari2.png' /></p>"
			}else{
				if(Browser.isOpera){
					C+="<p>Open Opera preferences, go to 'General' and click on 'Use current'.</p>";
					C+="<p style='text-align:center'><img src='img/help/startpage/win-op-01.png' /> <img src='img/help/startpage/win-op-02.png' /></p>"
				}else{
					C+="<p>Please refer to your browser manuel to know how to set Netvibes as your start page.</p>"
				}
			}
		}
		this.content.innerHTML=C;
		this.container.appendChild(this.content);
		var A=document.createElement("div");
		A.className="bottom";
		A.style.position="absolute";
		A.style.bottom="10px";
		A.style[App.dirRTL?"left":"right"]="10px";
		this.container.appendChild(A);
		var B=document.createElement("input");
		B.type="button";B.className="done";Element.addClassName(B,"button");B.value=_("Done");
		B.onclick=this.hide.bindAsEventListener(this);
		B.style.position="relative";B.style.width="10em";
		A.appendChild(B);
		return this.content
	},
	onClose:function(){this.destroy();window._SetAsStartPage=null}
});
window._SetAsStartPage=null;
App.showSetAsStartPage=function(){
	if(window._SetAsStartPage==null){
		window._SetAsStartPage=new Netvibes.SetAsStartPage("nv-startpage",{width:580,fadeEffect:(App.userCustom.enableFx=="1")})
	}
	window._SetAsStartPage.show()};
window._loginPanel=null;App.showLoginPanel=function(){App.showSignUpPanel()};;

//51
Netvibes.UI.StartTips=new Class({
	Implements:[Events,Options],
	initialize:function(A){
		this.tips=[{text:_("Click here to start personalizing this page"),element:"#addContentLink"}];
		this.nextIndex=0;
		this.tip=new Element("div",{"class":"tip balloon",styles:{position:"absolute",top:0,left:0}})
	},
	start:function(){
		this.tip.inject(document.body);
		var A='<div class="content"><p class="text"></p>';
		if(this.tips.length>1){
			A+='<p class="bottom"><span class="steps">'+this.nextIndex+1+"/"+this.tips.length+'</span> | <a rel="next" href="javascript:void(0)">'+_("next tip")+"</a></p>"
		}
		A+='<p><img id="tipClose" class="close" alt="" src="/img/closeMod.gif"/></p></div>';
		this.tip.setHTML(A);
		if(this.tips.length>1){$$('.tip a[rel="next"]')[0].onclick=this.onClick.bindWithEvent(this)}
		$$(".tip img#tipClose")[0].onclick=this.end.bindWithEvent(this);
		this.dimensions=this.tip.getSize();
		this.showNext();
		this.onDocumentClickRef=this.onDocumentClick.bindWithEvent(this);
		document.addEvent("click",this.onDocumentClickRef)
	},
	showNext:function(){
		var C=$$(this.tips[this.nextIndex].element)[0].getPosition();
		var B=$$(this.tips[this.nextIndex].element)[0].getSize();
		var A=this.dimensions.x;
		if(A+C.x+5>document.getSize().x){
			this.tip.addClass("balloonRight");this.tip.morph({top:C.y+B.y,left:C.x-A+B.x-5})
		}else{this.tip.morph({top:C.y+B.y,left:C.x+5})}
		if(this.tips.length>1){$$(".tip span.steps")[0].setHTML(this.nextIndex+1+"/"+this.tips.length)}
		$$(".tip p.text")[0].setHTML(this.tips[this.nextIndex].text);
		this.nextIndex++
	},
	end:function(){
		this.tip.destroy();this.tip=null;
		document.removeEvent("click",this.onDocumentClickRef);delete Netvibes.UI.StartTips
	},
	onClick:function(A){if(this.nextIndex<this.tips.length){this.showNext()}else{this.end()}},
	onDocumentClick:function(A){
		if(!this.tip){return }
		if(Position.within(this.tip,A.page.x,A.page.y)){
			A.stop();return false
		}
		this.end()
	}
});;

//52
Netvibes.Settings.General=Class.create();
Netvibes.Settings.General.prototype={
	initialize:function(){},
	load:function(){
		this.contentNode=document.createElement("div");
		var A="";
		A+="<h2>"+_("General settings")+"</h2>";
		A+="<fieldset>";
		A+="<legend>"+_("Interface")+"</legend>";
		A+='<p class="option">';
		A+='<input id="optionShowPageTitle" type="checkbox" /> ';
		A+='<label for="optionShowPageTitle">'+_("Display page title")+"</label> - ";
		A+='<em class="help">'+_("Uncheck to save space.")+"</em>";
		A+="</p>";
		if(!App.visit){
			A+='<p class="option">';
			A+='<input id="optionEnableSearch" type="checkbox" /> ';
			A+='<label for="optionEnableSearch">'+_("Display search area")+"</label> - ";
			A+='<em class="help">'+_("Uncheck if you don't want to use it.")+"</em>";
			A+="</p>"
		}
		A+='<p class="option">';
		A+='<input id="optionEnableShortcuts" type="checkbox" /> ';
		A+='<label for="optionEnableShortcuts">'+_("Enable keyboard navigation")+"</label> - ";
		A+='<em class="help">'+_("Enables shortcuts")+" ("+_('<a href="{0}">what\'s this?</a>').format("http://faq.netvibes.com/keyboard_shortcuts")+").</em>";
		A+="</p>";A+="</fieldset>";
		A+="<fieldset>";A+="<legend>"+_("Modules")+"</legend>";
		A+='<p class="option first">';
		A+='<input id="optionDisplayFavicons" type="checkbox" /> ';
		A+='<label for="optionDisplayFavicons">'+_("Display favicons")+"</label> - ";
		A+='<em class="help">'+_("Displays favicons of modules.")+"</em>";
		A+="</p>";A+='<p class="option">';
		A+='<input id="optionGiveRssMoreSpace" type="checkbox" /> ';
		A+='<label for="optionGiveRssMoreSpace">'+_("Give feed items more space")+"</label> - ";
		A+='<em class="help">'+_("Improves readability.")+"</em>";
		A+="</p>";
		A+='<p class="option">';
		A+='<input id="optionShowRssNavigation" type="checkbox" /> ';
		A+='<label for="optionShowRssNavigation">'+_("Enable feed pagination")+"</label> - ";
		A+='<em class="help">'+_("Display next/previous arrows.")+"</em>";A+="</p>";
		A+='<p class="option">';
		A+='<label for="optionUnreadPosition">'+_("Display unread count on the")+"</label> ";
		A+='<select id="optionUnreadPosition">';
		A+='<option value="left">'+_("left")+"</option>";
		A+='<option value="right">'+_("right")+"</option>";
		A+="</select>";A+="</p>";A+="</fieldset>";
		A+="<fieldset>";A+="<legend>"+_("Performance")+"</legend>";
		A+='<p class="option">';A+='<input id="optionDontPreload" type="checkbox" /> ';
		A+='<label for="optionDontPreload">'+_("Only load modules for current tab")+"</label> - ";
		A+='<em class="help">'+_("Reduces load for slow connections.")+"</em>";A+="</p>";
		A+='<p class="option last">';A+='<input id="optionEnableFx" type="checkbox" /> ';
		A+='<label for="optionEnableFx">'+_("Enable visual effects")+"</label>";
		A+="</p>";A+="</fieldset>";
		A+='<p style="text-align:right"><a id="restoreGeneralSettings" href="#">'+_("Restore defaults")+"</a></p>";
		this.contentNode.innerHTML=A;
		return this.contentNode
	},
	loaded:function(){this.attachEvents()},
	attachEvents:function(A){
		this.optionShowPageTitle=$("optionShowPageTitle");
		this.optionShowPageTitle.checked=(App.userCustom.showTitle=="1");
		this.optionShowPageTitle.onclick=this.onShowPageTitle.bindAsEventListener(this);
		this.optionGiveRssMoreSpace=$("optionGiveRssMoreSpace");
		this.optionGiveRssMoreSpace.checked=(App.userCustom.rssSpace=="1");
		this.optionGiveRssMoreSpace.onclick=this.onGiveRssMoreSpace.bindAsEventListener(this);
		this.optionShowRssNavigation=$("optionShowRssNavigation");
		this.optionShowRssNavigation.checked=(App.userCustom.showFeedNav=="1");
		this.optionShowRssNavigation.onclick=this.onShowRssNavigation.bindAsEventListener(this);
		this.optionDisplayFavicons=$("optionDisplayFavicons");
		this.optionDisplayFavicons.checked=(App.userCustom.hideFavIcons!="1");
		this.optionDisplayFavicons.onclick=this.onDisplayFavicons.bindAsEventListener(this);
		this.optionDontPreload=$("optionDontPreload");
		this.optionDontPreload.checked=(App.userCustom.dontPreload=="1");
		this.optionDontPreload.onclick=this.onDontPreload.bindAsEventListener(this);
		this.optionEnableShortcuts=$("optionEnableShortcuts");
		this.optionEnableShortcuts.checked=(App.userCustom.keyboardNav=="1");
		this.optionEnableShortcuts.onclick=this.onEnableShortcuts.bindAsEventListener(this);
		if(!App.visit){
			this.optionEnableSearch=$("optionEnableSearch");
			this.optionEnableSearch.checked=(App.userCustom.hideSearch!="1");
			this.optionEnableSearch.onclick=this.onEnableSearch.bindAsEventListener(this)
		}
		this.optionUnreadPosition=$("optionUnreadPosition");
		this.optionUnreadPosition.value=App.userCustom.unreadPosition;
		this.optionUnreadPosition.onchange=this.onChangeUnreadPosition.bindAsEventListener(this);
		this.optionEnableFx=$("optionEnableFx");
		this.optionEnableFx.checked=(App.userCustom.enableFx=="1");
		this.optionEnableFx.onchange=this.onChangeEnableFx.bindAsEventListener(this);
		$("restoreGeneralSettings").onclick=this.reset.bind(this)
	},
	reset:function(){
		this.optionShowPageTitle.checked=true;
		this.onShowPageTitle();
		this.optionGiveRssMoreSpace.checked=false;
		this.onGiveRssMoreSpace();
		this.optionShowRssNavigation.checked=true;
		this.onShowRssNavigation();
		this.optionUnreadPosition.value="left";
		this.onChangeUnreadPosition();
		this.optionDisplayFavicons.checked=true;
		this.onDisplayFavicons();
		this.optionDontPreload.checked=true;
		this.onDontPreload();
		this.optionEnableShortcuts.checked=false;
		this.onEnableShortcuts();
		if(!App.visit){this.optionEnableSearch.checked=true;this.onEnableSearch()}
		this.optionEnableFx.checked=true;
		this.onChangeEnableFx();
		this.save();
		return false
	},
	onShowPageTitle:function(A){
		App.userCustom.showTitle=this.optionShowPageTitle.checked?1:0;
		$("pageTitle").style.display=(App.userCustom.showTitle)?"block":"none";
		App.FeedReader.position();
		App.FeedReader.resize();
		if(A){this.save()}
	},
	onGiveRssMoreSpace:function(D){
		var C=this.optionGiveRssMoreSpace.checked;
		var B=null;
		for(var A=0;(B=document.getElementsByTagName("link")[A]);A++){
			if(B.getAttribute("rel").indexOf("style")!=-1&&B.getAttribute("href").indexOf("rssspace")!=-1){break}
		}
		if(C){
			if(!B){B=App.insertCssFile(NV_PATH+"themes/base/rssspace.css")}B.disabled=false
		}else{if(B){B.disabled=true}}
		App.userCustom.rssSpace=C?1:0;
		if(D){this.save()}
	},
	onShowRssNavigation:function(C){
		var B=this.optionShowRssNavigation.checked;
		App.userCustom.showFeedNav=B?1:0;
		var A=App.moduleList.length;
		for(var D=0;D<A;D++){
			if(typeof App.moduleList[D].widget=="undefined"){continue}
			if(typeof App.moduleList[D].widget.toggleNavigation=="function"){App.moduleList[D].widget.toggleNavigation(B)}
		}
		if(C){this.save()}
	},
	onChangeUnreadPosition:function(C){
		var A=this.optionUnreadPosition.value;
		if(C){this.save()}
		if(A=="left"||A=="right"){
			App.userCustom.unreadPosition=A;
			var B=App.moduleList.length;
			for(var D=0;D<B;D++){
				if(typeof App.moduleList[D].widget!="undefined"&&typeof App.moduleList[D].widget.setFeedTitle=="function"){
					App.moduleList[D].widget.setFeedTitle()
				}
				if(!App.moduleList[D].content){continue}
				if(App.moduleList[D].content.setFeedTitle){try{App.moduleList[D].content.setFeedTitle()}catch(C){}}
			}
		}
	},
	onDisplayFavicons:function(E){
		var D=this.optionDisplayFavicons.checked;
		App.userCustom.hideFavIcons=(D)?0:1;
		var A=document.getElementsByTagName("img");
		for(var C=0,B;(B=A[C]);C++){if(B.className.match(/hicon/)){B.style.visibility=D?"visible":"hidden"}}
		if(E){this.save()}
	},
	onDontPreload:function(A){App.userCustom.dontPreload=this.optionDontPreload.checked?1:0;if(A){this.save()}},
	onEnableShortcuts:function(A){App.userCustom.keyboardNav=(this.optionEnableShortcuts.checked)?1:0;if(A){this.save()}},
	onChangeEnableFx:function(A){App.userCustom.enableFx=(this.optionEnableFx.checked)?1:0;if(A){this.save()}},
	onEnableSearch:function(A){
		App.userCustom.hideSearch=(this.optionEnableSearch.checked)?0:1;
		if(App.userCustom.hideSearch){
			App.searchBox.style.visibility="hidden";if(App.isOnSearch){App.searchInNetvibes("")}
		}else{App.searchBox.style.visibility="visible"}
		if(A){this.save()}
	},
	onEnableFeedProxy:function(A){
		App.userCustom.feedProxy=(this.optionEnableFeedProxy.checked)?1:0;
		if(A){this.save()}
	},
	save:function(){App.saveUserCustom()}
};;

//53
Netvibes.Settings.Language=Class.create();
Netvibes.Settings.Language.prototype={
	initialize:function(){},
	load:function(){
		this.contentNode=document.createElement("div");this.contentNode.innerHTML=_("Loading ...");var A=new Ajax.Request(NV_PATH+"get/paneSetting.php",{method:"post",postBody:"pane=language",onSuccess:this.attachEvents.bind(this)});return this.contentNode
	},
	activate:function(){this.displayDefaultProgress()},
	attachEvents:function(C){
		this.contentNode.innerHTML=C.responseText;
		var B=$(this.contentNode).getElementsByClassName("lang");
		for(var D=0,A=B.length;D<A;D++){
			var E=B[D];E.onclick=this.eventClicked.bindAsEventListener(this);
			E.onmouseover=function(){
				var F=this.getAttribute("progress");
				$("translateProgressDone").style.width=F+"%";
				$("translateProgressLabel").innerHTML=_("Progress for {0}:").format(this.getAttribute("langTitle"))+" "+F+"%"
			};
			E.onmouseout=function(){this.displayDefaultProgress()}.bind(this)
		}
		this.displayDefaultProgress()
	},
	eventClicked:function(C){
		var B=Event.element(C);
		var A=$(this.contentNode).getElementsByClassName("selected");
		$A(A).each(function(D){Element.removeClassName(D,"selected")});
		Element.addClassName(B,"selected");
		Netvibes.Settings.Language.selectedLang=B.getAttribute("lang");
		Event.stop(C);return false
	},
	displayDefaultProgress:function(){
		var B=$(this.contentNode).getElementsByClassName("selected");for(var C=0,A=B.length;C<A;C++){var D=B[C].getAttribute("progress");$("translateProgressDone").style.width=D+"%";$("translateProgressLabel").innerHTML=_("{0}:").format(B[C].getAttribute("langTitle"))+" "+D+"%"}}};;

//54
Netvibes.Settings.LocalContent=Class.create();
Netvibes.Settings.locales=[
	{code:"al",continent:"eu",name:_("Albania")},{code:"at",continent:"eu",name:_("Austria")},{code:"pv",continent:"eu",name:_("Basque Country")},{code:"bef",continent:"eu",name:_("Belgium (French)")},{code:"be",continent:"eu",name:_("Belgium (Dutch)")},{code:"ba",continent:"eu",name:_("Bosnia and Herzegovina")},{code:"bg",continent:"eu",name:_("Bulgaria")},{code:"by",continent:"eu",name:_("Belarus")},{code:"ct",continent:"eu",name:_("Catalonia")},{code:"hr",continent:"eu",name:_("Croatia")},{code:"cy",continent:"eu",name:_("Cyprus")},{code:"cz",continent:"eu",name:_("Czech Republic")},{code:"ee",continent:"eu",name:_("Estonia")},{code:"fr",continent:"eu",name:_("France")},{code:"fi",continent:"eu",name:_("Finland")},{code:"nlf",continent:"eu",name:_("Friesland")},{code:"de",continent:"eu",name:_("Germany")},{code:"dk",continent:"eu",name:_("Denmark")},{code:"ga",continent:"eu",name:_("Galicia")},{code:"gr",continent:"eu",name:_("Greece")},{code:"gra",continent:"eu",name:_("Greece (Attica)")},{code:"hu",continent:"eu",name:_("Hungary")},{code:"it",continent:"eu",name:_("Italy")},{code:"ie",continent:"eu",name:_("Ireland")},{code:"is",continent:"eu",name:_("Iceland")},{code:"ko",continent:"eu",name:_("Kosovo")},{code:"lv",continent:"eu",name:_("Latvia")},{code:"lt",continent:"eu",name:_("Lithuania")},{code:"lu",continent:"eu",name:_("Luxembourg")},{code:"mt",continent:"eu",name:_("Malta")},{code:"nl",continent:"eu",name:_("Netherlands")},{code:"no",continent:"eu",name:_("Norway")},{code:"pl",continent:"eu",name:_("Poland")},{code:"pt",continent:"eu",name:_("Portugal")},{code:"ro",continent:"eu",name:_("Romania")},{code:"rs",continent:"eu",name:_("Serbia")},{code:"sk",continent:"eu",name:_("Slovakia")},{code:"si",continent:"eu",name:_("Slovenia")},{code:"es",continent:"eu",name:_("Spain")},{code:"se",continent:"eu",name:_("Sweden")},{code:"ch",continent:"eu",name:_("Switzerland")},{code:"chf",continent:"eu",name:_("Switzerland (French)")},{code:"tr",continent:"eu",name:_("Turkey")},{code:"ua",continent:"eu",name:_("Ukraine")},{code:"gb",continent:"eu",name:_("United Kingdom")},{code:"bz",continent:"na",name:_("Belize")},{code:"ca",continent:"na",name:_("Canada")},{code:"qc",continent:"na",name:_("Canada (Quebec)")},{code:"cr",continent:"na",name:_("Costa Rica")},{code:"cu",continent:"na",name:_("Cuba")},{code:"sv",continent:"na",name:_("El Salvador")},{code:"gt",continent:"na",name:_("Guatemala")},{code:"gy",continent:"na",name:_("Guyana")},{code:"hn",continent:"na",name:_("Honduras")},{code:"mx",continent:"na",name:_("Mexico")},{code:"ni",continent:"na",name:_("Nicaragua")},{code:"pa",continent:"na",name:_("Panama")},{code:"us",continent:"na",name:_("United States")},{code:"use",continent:"na",name:_("United States (Spanish)")},{code:"ar",continent:"sa",name:_("Argentina")},{code:"bo",continent:"sa",name:_("Bolivia")},{code:"br",continent:"sa",name:_("Brazil")},{code:"cl",continent:"sa",name:_("Chile")},{code:"co",continent:"sa",name:_("Colombia")},{code:"ec",continent:"sa",name:_("Ecuador")},{code:"fk",continent:"sa",name:_("Falkland Islands")},{code:"py",continent:"sa",name:_("Paraguay")},{code:"pe",continent:"sa",name:_("Peru")},{code:"sr",continent:"sa",name:_("Suriname")},{code:"uy",continent:"sa",name:_("Uruguay")},{code:"ve",continent:"sa",name:_("Venezuela")},{code:"dz",continent:"af",name:_("Algeria")},{code:"cm",continent:"af",name:_("Cameroon")},{code:"cd",continent:"af",name:_("Congo")},{code:"eg",continent:"af",name:_("Egypt")},{code:"et",continent:"af",name:_("Ethiopia")},{code:"ci",continent:"af",name:_("Cote d'Ivoire")},{code:"ke",continent:"af",name:_("Kenya")},{code:"ly",continent:"af",name:_("Libya")},{code:"mr",continent:"af",name:_("Mauritania")},{code:"ma",continent:"af",name:_("Morroco")},{code:"ng",continent:"af",name:_("Nigeria")},{code:"sn",continent:"af",name:_("Senegal")},{code:"so",continent:"af",name:_("Somalia")},{code:"za",continent:"af",name:_("South Africa")},{code:"tn",continent:"af",name:_("Tunisia")},{code:"au",continent:"oc",name:_("Australia")},{code:"nz",continent:"oc",name:_("New Zealand")},{code:"bh",continent:"as",name:_("Bahreïn")},{code:"bd",continent:"as",name:_("Bangladesh")},{code:"cn",continent:"as",name:_("China")},{code:"hk",continent:"as",name:_("Hong Kong")},{code:"in",continent:"as",name:_("India")},{code:"id",continent:"as",name:_("Indonesia")},{code:"ir",continent:"as",name:_("Iran")},{code:"iq",continent:"as",name:_("Iraq")},{code:"il",continent:"as",name:_("Israel")},{code:"jp",continent:"as",name:_("Japan")},{code:"jo",continent:"as",name:_("Jordan")},{code:"kp",continent:"as",name:_("Korea (North)")},{code:"kr",continent:"as",name:_("Korea (South)")},{code:"kw",continent:"as",name:_("Kuwait")},{code:"lb",continent:"as",name:_("Lebanon")},{code:"om",continent:"as",name:_("Oman")},{code:"my",continent:"as",name:_("Malaysia")},{code:"mn",continent:"as",name:_("Mongolia")},{code:"pk",continent:"as",name:_("Pakistan")},{code:"ps",continent:"as",name:_("Palestine")},{code:"ph",continent:"as",name:_("Philippines")},{code:"qa",continent:"as",name:_("Qatar")},{code:"ru",continent:"as",name:_("Russia")},{code:"sa",continent:"as",name:_("Saudi Arabia")},{code:"sg",continent:"as",name:_("Singapore")},{code:"sy",continent:"as",name:_("Syria")},{code:"tw",continent:"as",name:_("Taiwan")},{code:"th",continent:"as",name:_("Thailand")},{code:"tr",continent:"as",name:_("Turkey")},{code:"ae",continent:"as",name:_("United Arab Emirates")},{code:"vn",continent:"as",name:_("Vietnam")},{code:"ye",continent:"as",name:_("Yemen")}];
Netvibes.Settings.LocalContent.prototype={
	initialize:function(){this.continents=[{code:"eu",imageUrl:NV_PATH+"img/worldmap-eu.gif",name:_("Europe")},{code:"na",imageUrl:NV_PATH+"img/worldmap-na.gif",name:_("North America")},{code:"sa",imageUrl:NV_PATH+"img/worldmap-sa.gif",name:_("South America")},{code:"oc",imageUrl:NV_PATH+"img/worldmap-oc.gif",name:_("Oceania")},{code:"as",imageUrl:NV_PATH+"img/worldmap-as.gif",name:_("Asia")},{code:"af",imageUrl:NV_PATH+"img/worldmap-af.gif",name:_("Africa")}];this.preload=[];for(var A=0,B;B=this.continents[A];A++){this.preload[B.code]=new Image();this.preload[B.code].src=B.imageUrl}},load:function(){this.contentNode=document.createElement("div");var A=this.getRegion(User.locale)||this.getRegion(App.locale)||this.getRegion("us");this.continent=this.getContinent(A.continent);var B="";B+="<h2>"+_("Local content")+"</h2>";B+="<p>";B+='<img src="'+this.continent.imageUrl+'" width="460" height="212" usemap="#localContentMap" alt="" />';B+="</p>";B+='<map id="localContentMap" name="localContentMap">';B+='<area shape="poly" href="javascript:void(0)" continent="oc" alt="'+_("Oceania")+'" title="'+_("Oceania")+'" coords="372,132, 383,86, 460,107, 453,149, 432,178, 400,197, 343,175, 347,143" />';B+='<area shape="poly" href="javascript:void(0)" continent="as" alt="'+_("Asia")+'" title="'+_("Asia")+'" coords="348,141, 371,132, 381,86, 405,19, 278,0, 269,11, 261,62, 238,54, 233,59, 260,99, 278,93, 295,115, 315,115, 320,106" />';B+='<area shape="poly" href="javascript:void(0)" continent="af" alt="'+_("Africa")+'" title="'+_("Africa")+'" coords="259,100, 272,96, 283,139, 278,156, 254,161, 238,174, 219,170, 205,114, 180,114, 163,93, 186,67, 195,67, 215,62, 226,68, 238,68" />';B+='<area shape="poly" href="javascript:void(0)" continent="sa" alt="'+_("South America")+'" title="'+_("South America")+'" coords="108,93, 160,126, 135,205, 113,203, 78,115" />';B+='<area shape="poly" href="javascript:void(0)" continent="na" alt="'+_("North America")+'" title="'+_("North America")+'" coords="128,104, 131,93, 109,75, 148,54, 146,36, 178,24, 200,5, 201,0, 109,0, 46,11, 16,32, 24,47, 43,37, 41,70, 61,100, 88,106, 109,91" />';B+='<area shape="poly" href="javascript:void(0)" continent="eu" alt="'+_("Europe")+'" title="'+_("Europe")+'" coords="176,26, 189,33, 186,64, 195,65, 214,60, 226,67, 235,67, 233,58, 238,53, 260,60, 269,7, 207,2, 184,19" />';B+="</map>";B+='<fieldset class="autoclear">';B+="<legend>"+this.continent.name+"</legend>";B+='<div id="localContentRegions"></div>';B+="</fieldset>";B+='<p style="clear:both; padding:.5em;">'+_('Help us build the Netvibes personal start page for your country/region. If you want to create or improve your local selection, please <a href="{0}">contact us</a>').format("http://translators.netvibes.com/")+".</p>";this.contentNode.innerHTML=B;return this.contentNode},loaded:function(){var A=this.contentNode.getElementsByTagName("area");for(var B=0,C;C=A[B];B++){C.onclick=this.eventMapClicked.bindAsEventListener(this)}if(this.continent){this.loadRegions(this.continent.code)}},activate:function(){var A=this.getRegion(User.locale)||this.getRegion(App.locale)||this.getRegion("us");this.loadRegions(this.getContinent(A.continent).code)},getRegion:function(A){return Netvibes.Settings.locales.detect(function(B){return B.code==A})},getContinent:function(A){return this.continents.detect(function(B){return B.code==A})},eventMapClicked:function(B){var A=Event.element(B);this.loadRegions(A.getAttribute("continent"));Event.stop(B)},loadRegions:function(F){this.continent=this.getContinent(F);if(!this.continent){return false}var D=this.contentNode.getElementsByTagName("img").item(0);var I=this.continent.imageUrl;setTimeout(function(){D.src=I},20);this.contentNode.getElementsByTagName("legend")[0].innerHTML=this.continent.name;var G="";var K=[];Netvibes.Settings.locales.each(function(N){if(N.continent==F){K.push(N.name)}});K.sort();var E=Math.max(4,Math.ceil(K.length/2));for(var C=0;C<K.length;C++){var L=K[C];var M=Netvibes.Settings.locales.detect(function(N){return N.name==L}).code;var H=C%E;if(H==0){G+='<div class="column two"><ul class="regions">'}var B=(M==User.locale)||(M==App.locale);G+='<li><a class="country'+(B?" selected":"")+'" href="javascript:void(0)" country="'+M+'">'+L+"</a></li>";if((H+1)==E||(C+1)==K.length){G+="</ul></div>"}}$("localContentRegions").innerHTML=G;var J=$(this.contentNode).getElementsByClassName("country");for(var C=0,A=J.length;C<A;C++){J[C].onclick=this.eventRegionClicked.bindAsEventListener(this)}},eventRegionClicked:function(D){var A=Event.element(D);var B=$(this.contentNode).getElementsByClassName("selected");$A(B).each(function(E){Element.removeClassName(E,"selected")});Element.addClassName(A,"selected");var C=A.getAttribute("country");if(C!=App.locale){if(App.startWizard){App.startWizard.setLocale(C)}App.Request.newRequest({url:"/ajax/save/userData.php",onSuccess:function(E){App.locale=User.locale=C;if(App.Panel.current=="AddContent"){App.Panel.element.loaded=false;App.Panel.open("AddContent")}}}).post({mode:"localContent",locale:C})}Event.stop(D)}};;

//55
Netvibes.Settings.Theme=Class.create();
Netvibes.Settings.Theme.prototype={
	initialize:function(){this.instances=[]},load:function(){this.contentNode=document.createElement("div");this.contentNode.innerHTML="<h2>"+_("Themes")+"</h2>";this.tabs=new Netvibes.UI.TabView();this.tabs.addTab("gallery",{text:_("Select a theme")});this.tabs.addTab("create",{text:_("Create my own theme")});if(typeof superCustom!="undefined"||App.userCustom.expertModeCss){this.tabs.addTab("expert",{text:_("Expert mode")})}this.tabs.observe("activeTabChange",this.onActiveTabChanged.bind(this));this.tabs.appendTo(this.contentNode);Element.addClassName(this.tabs.tabSet,"nv-tabSettings");this.onActiveTabChanged("gallery");return this.contentNode},onActiveTabChanged:function(A,C){var B=this.tabs.getTabContent(A);if(B.loaded){return }switch(A){case"gallery":this.instances[A]=new Netvibes.Settings.Theme.Gallery(B);break;case"create":this.instances[A]=new Netvibes.Settings.Theme.Create(B);break;case"expert":this.instances[A]=new Netvibes.Settings.Theme.Expert(B);break;default:break}B.loaded=true},onRestoreDefaults:function(A){}};
Netvibes.Settings.Theme.Gallery=Class.create();
Netvibes.Settings.Theme.Gallery.defaultThemeTitle="Exposition Blueberry";
Netvibes.Settings.Theme.Gallery.prototype={
	initialize:function(A){this.contentNode=A;this.contentNode.innerHTML=_("Loading ...");var B=new Request({onSuccess:this.attachEvents.bind(this)}).post("/get/paneSetting.php",{pane:"theme"})},attachEvents:function(F){this.contentNode.innerHTML=F;if(typeof App.userCustom.themeUrl=="undefined"){App.userCustom.themeTitle=Netvibes.Settings.Theme.Gallery.defaultThemeTitle}var C=$(this.contentNode).getElementsByClassName("switcher");if(C.length==1){Element.addClassName(C[0],"selected");return }var B=this;for(var D=0,A=C.length;D<A;D++){var E=C[D];if(App.userCustom.themeTitle==E.title){Element.addClassName(E,"selected")}E.onclick=function(H){var G=$(B.contentNode).getElementsByClassName("switcher");$A(G).each(function(I){Element.removeClassName(I,"selected")});Element.addClassName(this,"selected");App.userCustom.themeUrl=this.getAttribute("themeUrl");App.userCustom.themeTitle=this.title;Netvibes.Settings.Theme.Gallery.switchTo(App.userCustom.themeUrl,this.title);App.saveUserCustom();return false}}}};
Netvibes.Settings.Theme.Gallery.switchTo=function(A,B){
	if(App.userCustom.bodyBackground||App.userCustom.bodyColor||App.userCustom.headerColor||App.userCustom.headerTextColor||App.userCustom.headerBackground||App.userCustom.headerHeight){if(!window.confirm(_("Do you want to keep your wallpapers settings?"))){delete App.userCustom.bodyBackground;delete App.userCustom.bodyColor;delete App.userCustom.bodyFixed;delete App.userCustom.headerColor;delete App.userCustom.headerTextColor;delete App.userCustom.headerBackground;delete App.userCustom.headerHeight;if($("optionBackgroundNoColor")){$("optionBackgroundNoColor").checked="checked"}if($("optionBodyFixed")){$("optionBodyFixed").checked=""}if($("optionHeaderBackgroundNoColor")){$("optionHeaderBackgroundNoColor").checked="checked"}if($("optionHeaderTextNoColor")){$("optionHeaderTextNoColor").checked="checked"}if($("optionHeaderCursor")){$("optionHeaderCursor").style.left="0px"}}}if(App.useMergedCss){if(A.indexOf(".m.css")<0){A=A.replace(/.css/,".css.m.css")}}document.addPreferredStyleSheet(A,B);setTimeout(function(){App.notifyModuleThemeUpdated(A)},100);Netvibes.Settings.Wallpaper.Header.update();Netvibes.Settings.Wallpaper.Body.update();setTimeout(function(){document.setActiveStyleSheet(B)},50)};
Netvibes.Settings.Theme.Create=Class.create();
Netvibes.Settings.Theme.Create.prototype={
	initialize:function(B){B.innerHTML="<p>"+_("Pick a color below to create your own theme:")+"</p><br />";function E(G,F){$("settingsThemeRGBValue").value=F;App.userCustom.themeUrl="/themes/my-plain/screen.css.php?color="+F;App.userCustom.themeTitle="My Plain #"+F;App.saveUserCustom();Netvibes.Settings.Theme.Gallery.switchTo(App.userCustom.themeUrl,App.userCustom.themeTitle)}if(App.userCustom.themeTitle.substr(0,8)=="My Plain"){var D=App.userCustom.themeTitle.substr(9,16)}else{var D=false}var A=Utils.smallColorPicker(E,D);B.appendChild(A);var C=document.createElement("p");C.innerHTML="<br/><br/>"+_("Custom color:")+" #<input id='settingsThemeRGBValue' value='' /><input type='button' id='settingsThemeRGBValueApply' value='"+_("Apply")+"' /><br/>";B.appendChild(C);if(D){$("settingsThemeRGBValue").value=D.substr(1,100)}$("settingsThemeRGBValueApply").onclick=function(){if(App.userCustom.themeTitle=="My Plain "+$("settingsThemeRGBValue").value){return }E(false,$("settingsThemeRGBValue").value);$("settingsColorPickerCross").style.display="none"}}};
Netvibes.Settings.Theme.Expert=Class.create();
Netvibes.Settings.Theme.Expert.prototype={
	initialize:function(A){A.innerHTML="Enter your own CSS below:<br/><textarea style='width:436px;height:315px;font-family:monospace;'></textarea><p align='right'><input type='button' value='Apply'></p>";if(App.userCustom.expertModeCss){A.getElementsByTagName("textarea")[0].value=App.userCustom.expertModeCss}A.getElementsByTagName("input")[0].onclick=function(){App.userCustom.expertModeCss=A.getElementsByTagName("textarea")[0].value;App.saveUserCustom();Netvibes.Settings.Theme.Expert.update()}}};Netvibes.Settings.Theme.Expert.update=function(){if(App.userCustom.expertModeCss){if(!$("expertModeCss")){var A=document.createElement("style");A.id="expertModeCss";A.setAttribute("type","text/css");document.getElementsByTagName("head")[0].appendChild(A)}if(Browser.isIE){$("expertModeCss").styleSheet.cssText=App.userCustom.expertModeCss}else{$("expertModeCss").innerText="";var B=document.createTextNode(App.userCustom.expertModeCss);$("expertModeCss").appendChild(B)}}};;

//56
Netvibes.Settings.Wallpaper=Class.create();
Netvibes.Settings.Wallpaper.prototype={
	initialize:function(){this.instances=[]},load:function(){this.contentNode=document.createElement("div");this.contentNode.innerHTML="<h2>"+_("Wallpapers")+"</h2>";this.tabs=new Netvibes.UI.TabView();this.tabs.addTab("header",{text:_("Top wallpaper")});this.tabs.addTab("body",{text:_("Bottom wallpaper")});this.tabs.observe("activeTabChange",this.onActiveTabChanged.bind(this));this.tabs.appendTo(this.contentNode);Element.addClassName(this.tabs.tabSet,"nv-tabSettings");return this.contentNode},loaded:function(){this.onActiveTabChanged("header")},onActiveTabChanged:function(A,C){var B=this.tabs.getTabContent(A);if(B.loaded){return }switch(A){case"header":this.instances[A]=new Netvibes.Settings.Wallpaper.Header(B);break;case"body":this.instances[A]=new Netvibes.Settings.Wallpaper.Body(B);break;default:break}B.loaded=true},onRestoreDefaults:function(A){}};
Netvibes.Settings.Wallpaper.Body=Class.create();
Netvibes.Settings.Wallpaper.Body.prototype={
	initialize:function(A){this.contentNode=A;this.contentNode.innerHTML="";var B=new Request({onSuccess:this.displayFlickr.bind(this)}).get("/data/flickr/index.php",{q:"wallpaper"});this.build()},build:function(){var L=this;this.contentNode.innerHTML=_("Select an image from")+" <select id='settingsWallpaperBodySelect'><option value='0' name='netvibes'>"+_("netvibes selection")+"</option><option value='1' name='url'>"+_("link (url)")+"</option><option value='2' name='flickr'>flickr</option><option value='3' name='myspace'>myspace</option><option value='4' name='twitter'>twitter</option></select>";var I=document.createElement("div");for(var D=0;D<=4;D++){var A=document.createElement("div");A.style.display="none";I.appendChild(A)}this.contentNode.appendChild(I);$("settingsWallpaperBodySelect").onchange=function(){L.onTabChange(this.value,this.childNodes[this.value].getAttribute("name"))};this.onTabChange(2,"flickr");this.onTabChange(1,"url");this.onTabChange(0,"netvibes");var A=document.createElement("div");A.innerHTML='<hr style="clear:both;height:1px;margin:0px;margin-bottom:14px" /><div style="margin-bottom:6px">'+_("Or background color:")+' <input type="radio" id="optionBackgroundColorRadio" name="optionBackgroundColorRadio" value="#AAAAAA" /> <img id="optionBodyColorZone" width="30" height="15" src="img/s.gif" style="border: 1px solid grey;background-color: #AAAAAA;vertical-align: middle; margin-bottom: 3px"/><input id="optionBodyInputColor" type="text" value="#AAAAAA" style="margin-left:2px;width:65px" /><input id="optionBackgroundNoColor" type="radio" name="optionBackgroundColorRadio" style="margin-left:50px"/> <label for="optionBackgroundNoColor">'+_("Default")+'</label></div><div id="advanceBodyOptions" style="display:none;"><fieldset style=\'margin-top:10px\'><legend>'+_("Advanced options")+"</legend>"+_("Display mode:")+' <select id="optionBodyDisplayMode"><option value="center">'+_("center")+'</option><option value="tile">'+_("tile")+'</option></select><input id="optionBodyFixed" type="checkbox" style="margin-left:50px"/> <label for="optionBodyFixed">'+_("Fixed wallpaper")+"</label></fieldset></div>";A.innerHTML+='<table width="100%"><tr><td><a id="optionBodydAdvancedLink" href="javascript:void(0)" class="advanced">'+_("Show advanced options")+'</a></td><td align="right"><a id="optionBodyRestoreLink" href="#">'+_("Restore defaults")+"</a></td></tr></table>";this.contentNode.appendChild(A);var C=$("optionBodyDisplayMode");var K=$("optionBodyFixed");var H=$("optionBodyColorZone");var G=$("optionBackgroundColorRadio");var J=$("optionBodyInputColor");var E=$("optionBackgroundNoColor");var B=$("optionBodyRestoreLink");var F=$("optionBodydAdvancedLink");if(App.userCustom.bodyCenter){C.value="center"}else{C.value="tile"}if(App.userCustom.bodyFixed){K.checked="checked"}if(App.userCustom.bodyColor){G.value=App.userCustom.bodyColor;J.value=App.userCustom.bodyColor;G.checked="checked";H.style.backgroundColor=App.userCustom.bodyColor}else{E.checked="checked"}C.onchange=function(){if(this.value=="center"){App.userCustom.bodyCenter=1}else{delete App.userCustom.bodyCenter}App.saveUserCustom();Netvibes.Settings.Wallpaper.Body.update()};K.onclick=function(){if(this.checked){App.userCustom.bodyFixed=1}else{delete App.userCustom.bodyFixed}App.saveUserCustom();Netvibes.Settings.Wallpaper.Body.update()};H.style.cursor="pointer";H.onclick=function(M){Netvibes.UI.showColorPicker(this.parentNode,{color:App.userCustom.bodyColor,onSelectionChange:function(N){J.value="#"+N;G.value="#"+N;H.style.backgroundColor="#"+N;G.click()}})};J.onblur=function(){if(App.userCustom.bodyColor==this.value){return false}H.style.backgroundColor=this.value;G.value=this.value;G.click()};G.onclick=function(){App.userCustom.bodyColor=this.value;delete App.userCustom.bodyBackground;App.saveUserCustom();Netvibes.Settings.Wallpaper.Body.update()};E.onclick=function(){delete App.userCustom.bodyColor;App.saveUserCustom();Netvibes.Settings.Wallpaper.Body.update()};B.onclick=function(M){E.checked="checked";delete App.userCustom.bodyColor;K.checked="";delete App.userCustom.bodyFixed;C.value="tile";delete App.userCustom.bodyCenter;$("optionBodyUrl").value="";$("optionBodyUrlApply").click();return false};F.onclick=function(){var O=$(L.contentNode).getElementsByClassName("listThemes");if($("advanceBodyOptions").style.display=="block"){var M=53;this.innerHTML=_("Show advanced options");$("advanceBodyOptions").style.display="none"}else{var M=-53;this.innerHTML=_("Hide advanced options");$("advanceBodyOptions").style.display="block"}var P=O.length;for(var N=0;N<P;N++){O[N].style.height=(parseInt(O[N].style.height)+M)+"px"}return false}},onTabChange:function(J,A){var K=this.contentNode.getElementsByTagName("div")[0].childNodes;var I=K.length;for(var F=0;F<I;F++){K[F].style.display="none"}var C=K[J];C.style.display="block";if(Browser.isIE){C.style.padding="0px 5px 0px 5px"}else{C.style.padding="0px 5px 10px 5px"}var L=this;switch(A){case"flickr":if(!C.loaded){C.innerHTML='<form><img src="/img/flickr.png" style="vertical-align:top;margin-right:2px" /><input value="wallpaper" type="text" style="width:200px;"/><input class="submit" type="submit" value="'+_("search")+'" /><div class="listThemes" style="margin-top:5px;margin-left:-5px;width:439px;height:237px;">'+_("Loading...")+"</div></form>";var H=C.getElementsByTagName("input");var B=C.firstChild;B.onsubmit=function(){var N=new Request({onSuccess:L.displayFlickr.bind(L)}).get("/data/flickr/index.php",{q:H[0].value.replace(/\s/g,","),random:Math.random()});var M=$(C).getElementsByClassName("listThemes")[0];M.innerHTML=_("Loading...");return false};C.loaded=true}break;case"url":if(!C.loaded){C.innerHTML="<br/><form onsubmit='return false;'>"+_("Address (URL):")+' <input id="optionBodyUrl" type="text" style="width:220px" /><input id="optionBodyUrlApply" type="button" value="'+_("Apply")+'"/></form><div style="margin-top:15px"></div>';var G=$("optionBodyUrl");var D=$("optionBodyUrlApply");if(typeof App.userCustom.bodyBackground!="undefined"){G.value=App.userCustom.bodyBackground}D.onclick=function(){var M=this.parentNode.nextSibling;if(G.value==""){delete App.userCustom.bodyBackground;M.innerHTML=""}else{App.userCustom.bodyBackground=G.value;M.innerHTML="<p align='center'><img width='150' height='150' src='"+G.value+"' /></p>"}App.saveUserCustom();Netvibes.Settings.Wallpaper.Body.update();return false}}C.loaded=true;break;case"netvibes":if(!C.loaded){C.innerHTML='<div class="listThemes" style="margin-top:5px;margin-left:-5px;width:439px;height:257px;">'+_("Loading...")+"</div>";var E=[{src:"/img/wallpapers/thumbs/_blank.gif",src_o:"/img/wallpapers/_blank.gif"},{src:"/img/wallpapers/thumbs/cupcake.jpg",src_o:"/img/wallpapers/cupcake.gif"},{src:"/img/wallpapers/thumbs/candy.jpg",src_o:"/img/wallpapers/candy.jpg"},{src:"/img/wallpapers/thumbs/daisy.png",src_o:"/img/wallpapers/daisy.jpg"},{src:"/img/wallpapers/thumbs/drop.jpg",src_o:"/img/wallpapers/drop.png"},{src:"/img/wallpapers/thumbs/flower.jpg",src_o:"/img/wallpapers/flower.png"},{src:"/img/wallpapers/thumbs/polka-green.jpg",src_o:"/img/wallpapers/polka-green.png"},{src:"/img/wallpapers/thumbs/polka-purple.jpg",src_o:"/img/wallpapers/polka-purple.png"},{src:"/img/wallpapers/thumbs/stripes-black.jpg",src_o:"/img/wallpapers/stripes-black.jpg"},{src:"/img/wallpapers/thumbs/stripes-gray.jpg",src_o:"/img/wallpapers/stripes-gray.png"},{src:"/img/wallpapers/thumbs/stripes-orange.jpg",src_o:"/img/wallpapers/stripes-orange.png"},{src:"/img/wallpapers/thumbs/pieddepoule-blue.jpg",src_o:"/img/wallpapers/pieddepoule-blue.png"},{src:"/img/wallpapers/thumbs/pieddepoule-gray.jpg",src_o:"/img/wallpapers/pieddepoule-gray.png"},{src:"/img/wallpapers/thumbs/psychedelik.jpg",src_o:"/img/wallpapers/psychedelik.png"},{src:"/img/wallpapers/thumbs/japanese-gray.jpg",src_o:"/img/wallpapers/japanese-gray.png"},{src:"/img/wallpapers/thumbs/japanese-red.png",src_o:"/img/wallpapers/japanese-red.jpg"},{src:"/img/wallpapers/thumbs/star.jpg",src_o:"/img/wallpapers/star.gif"},{src:"/img/wallpapers/thumbs/tartan-kaki.jpg",src_o:"/img/wallpapers/tartan-kaki.png"},{src:"/img/wallpapers/thumbs/water.jpg",src_o:"/img/wallpapers/water.jpg"},{src:"/img/wallpapers/thumbs/zebra.jpg",src_o:"/img/wallpapers/zebra.jpg"},{src:"/img/wallpapers/thumbs/leopard.jpg",src_o:"/img/wallpapers/leopard.jpg"},{src:"/img/wallpapers/thumbs/apples.png",src_o:"/img/wallpapers/apples.png"},{src:"/img/wallpapers/thumbs/bluestripes.png",src_o:"/img/wallpapers/bluestripes.png"},{src:"/img/wallpapers/thumbs/brushedmetal.png",src_o:"/img/wallpapers/brushedmetal.png"},{src:"/img/wallpapers/thumbs/camo.png",src_o:"/img/wallpapers/camo.png"},{src:"/img/wallpapers/thumbs/carbon.png",src_o:"/img/wallpapers/carbon.png"},{src:"/img/wallpapers/thumbs/dots.png",src_o:"/img/wallpapers/dots.png"},{src:"/img/wallpapers/thumbs/lines.png",src_o:"/img/wallpapers/lines.png"},{src:"/img/wallpapers/thumbs/love.png",src_o:"/img/wallpapers/love.png"},{src:"/img/wallpapers/thumbs/spots.png",src_o:"/img/wallpapers/spots.png"},{src:"/img/wallpapers/thumbs/squares.jpg",src_o:"/img/wallpapers/squares.jpg"},{src:"/img/wallpapers/thumbs/stars.png",src_o:"/img/wallpapers/stars.png"}];this.displayNetvibes(E);C.loaded=true}break;case"myspace":if(!C.loaded){C.innerHTML='<br/><form><img src="/modules/myspace/icon-myspace.gif" style="vertical-align:top;margin-right:2px" /> http://www.myspace.com/<input value="" type="text" style="width:100px"/><input class="submit" type="submit" value="'+_("Import")+'" /></form><div style="margin-top:15px"></div>';var H=C.getElementsByTagName("input");H[1].onclick=function(){this.parentNode.nextSibling.innerHTML=_("Loading...");var M=new Request({onSuccess:L.displayMyspace.bind(L)}).get("/ajax/settings/get/myspace.php",{q:H[0].value});return false};C.loaded=true}break;case"twitter":if(!C.loaded){C.innerHTML='<br/><form><img src="/img/sendModule/twitter.gif" style="vertical-align:top;margin-right:2px" /> http://www.twitter.com/<input value="" type="text" style="width:100px"/><input class="submit" type="submit" value="'+_("Import")+'" /></form><div style="margin-top:15px"></div>';var H=C.getElementsByTagName("input");H[1].onclick=function(){this.parentNode.nextSibling.innerHTML=_("Loading...");var M=new Request({onSuccess:L.displayTwitter.bind(L)}).get("/ajax/settings/get/twitter.php",{q:H[0].value});return false};C.loaded=true}break}},displayNetvibes:function(responseText){if(typeof responseText==="object"){var json=responseText}else{try{var json=eval("("+responseText+")")}catch(e){var json=[]}}var tabContent=this.contentNode.getElementsByTagName("div")[0].childNodes[0];var container=tabContent.getElementsByTagName("div")[0];var newContainer=document.createElement("div");container.innerHTML="";container.appendChild(newContainer);var ln=json.length;var self=this;for(var i=0;i<ln;i++){var div=document.createElement("div");div.className="themeItem";div.style.margin="3px";div.innerHTML='<p><a href="javascript:void(0)" class="switcher"><img width="75" height="75" indexI="'+i+'" src="'+json[i].src+'" /></a></p>';if(App.userCustom.bodyBackground&&App.userCustom.bodyBackground==json[i].src_o){Element.addClassName(div.firstChild.firstChild,"selected")}div.getElementsByTagName("a")[0].onclick=function(e){var links=$(self.contentNode).getElementsByClassName("switcher");$A(links).each(function(link){Element.removeClassName(link,"selected")});Element.addClassName(this,"selected");var i=this.firstChild.getAttribute("indexI");var scroll=container.scrollTop;var url=json[i].src_o;$("optionBodyDisplayMode").value="tile";delete App.userCustom.bodyCenter;if(url=="/img/wallpapers/_blank.gif"){self.switchBackground()}else{self.switchBackground(url)}container.scrollTop=scroll;return false};newContainer.appendChild(div)}var hr=document.createElement("hr");hr.style.clear="both";hr.style.visibility="hidden";newContainer.appendChild(hr)},displayFlickr:function(responseText){try{var json=eval("("+responseText+")")}catch(e){var json=[]}var tabContent=this.contentNode.getElementsByTagName("div")[0].childNodes[2];var container=tabContent.getElementsByTagName("div")[0];container.innerHTML="";var newContainer=document.createElement("div");container.appendChild(newContainer);var ln=json.length;if(ln==0){container.innerHTML=_("No result for this search.")}var self=this;for(var i=0;i<ln;i++){var div=document.createElement("div");div.className="themeItem";div.style.margin="3px";div.innerHTML='<p><a href="javascript:void(0)" class="switcher"><img indexI="'+i+'" src="'+json[i].src+'" /></a></p>';div.getElementsByTagName("a")[0].onclick=function(e){var links=$(self.contentNode).getElementsByClassName("switcher");$A(links).each(function(link){Element.removeClassName(link,"selected")});Element.addClassName(this,"selected");var i=this.firstChild.getAttribute("indexI");var scroll=container.scrollTop;var url=json[i].src_o;self.switchBackground(url);container.scrollTop=scroll;return false};div.getElementsByTagName("a")[0].href=json[i].href;div.getElementsByTagName("a")[0].name=_("Author:")+" "+json[i].authorName+" ("+json[i].src_o_w+"*"+json[i].src_o_h+")";div.getElementsByTagName("a")[0].title=_("Author:")+" "+json[i].authorName+" ("+json[i].src_o_w+"*"+json[i].src_o_h+")";newContainer.appendChild(div)}var hr=document.createElement("hr");hr.style.clear="both";hr.style.visibility="hidden";newContainer.appendChild(hr)},displayMyspace:function(C){var A=C;var B=this.contentNode.getElementsByTagName("div")[0].childNodes[3];var D=B.getElementsByTagName("div")[0];D.className="";if(A=="error"){D.className="error";D.innerHTML=_("Error! Please Check if this myspace has a background image")}else{D.innerHTML=_("Background image has been imported");D.innerHTML+="<br/><p align='center'><img width='150' height='150' src='"+A+"' /></p>";this.switchBackground(A)}},displayTwitter:function(C){var A=C;var B=this.contentNode.getElementsByTagName("div")[0].childNodes[4];var D=B.getElementsByTagName("div")[0];D.className="";if(A=="error"){D.className="error";D.innerHTML=_("Error")}else{D.innerHTML=_("Background image has been imported");D.innerHTML+="<br/><p align='center'><img width='150' height='150' src='"+A+"' /></p>";this.switchBackground(A)}},switchBackground:function(A){if(typeof A=="undefined"){$("optionBodyUrl").value="";delete App.userCustom.bodyBackground}else{$("optionBodyUrl").value=A;App.userCustom.bodyBackground=A}App.saveUserCustom();Netvibes.Settings.Wallpaper.Body.update()}};
	
Netvibes.Settings.Wallpaper.Body.update=function(){
	document.body.setAttribute("style","");var B;for(var A=0;l=document.getElementsByTagName("link")[A];A++){if(l.getAttribute("rel").indexOf("style")!=-1&&l.getAttribute("href").indexOf("noborder")!=-1){B=l;break}}if(App.userCustom.bodyBackground){document.body.style.backgroundImage="url("+App.userCustom.bodyBackground+")";if(App.userCustom.bodyCenter){document.body.style.backgroundPosition="center center";document.body.style.backgroundRepeat="no-repeat"}else{document.body.style.backgroundPosition="top left";document.body.style.backgroundRepeat="repeat"}if(App.userCustom.bodyFixed){document.body.style.backgroundAttachment="fixed"}else{document.body.style.backgroundAttachment=""}if(B){B.disabled=false}else{setTimeout(function(){App.insertCssFile(NV_PATH+"themes/base/noborder.css")},10)}}else{document.body.style.backgroundImage="";document.body.style.backgroundRepeat="";document.body.style.backgroundAttachment="";document.body.style.backgroundPosition="";if(B){B.disabled=true}}if(App.userCustom.bodyColor){document.body.style.backgroundColor=App.userCustom.bodyColor;if(!App.userCustom.bodyBackground){document.body.style.backgroundImage="url(img/s.gif)"}if(B){B.disabled=false}else{setTimeout(function(){App.insertCssFile(NV_PATH+"themes/base/noborder.css")},10)}}else{document.body.style.backgroundColor=""}};
Netvibes.Settings.Wallpaper.Header=Class.create();
Netvibes.Settings.Wallpaper.Header.prototype={
	initialize:function(A){this.contentNode=A;this.contentNode.innerHTML="";this.build()},build:function(){var K=this;this.contentNode.innerHTML=_("Select an image from")+" <select id='settingsWallpaperHeaderSelect'><option value='0' name='netvibes'>"+_("netvibes selection")+"</option><option value='1' name='url'>"+_("link (url)")+"</option><option value='2' name='flickr'>flickr</option><option value='3' name='myspace'>myspace</option><option value='4' name='twitter'>twitter</option></select>";var D=document.createElement("div");for(var S=0;S<=4;S++){var I=document.createElement("div");I.style.display="none";D.appendChild(I)}this.contentNode.appendChild(D);$("settingsWallpaperHeaderSelect").onchange=function(){K.onTabChange(this.value,this.childNodes[this.value].getAttribute("name"))};this.onTabChange(2,"flickr");this.onTabChange(1,"url");this.onTabChange(0,"netvibes");var I=document.createElement("div");var E=425;if(Browser.isIE&&Browser.version<7){E=410}I.innerHTML='<hr style="clear:both;height:1px;margin:0px;margin-bottom:14px" /><div style="margin-bottom:6px">'+_("Or background color:")+' <input type="radio" id="optionHeaderBackgroundColorRadio" name="optionHeaderBackgroundColorRadio" value="#AAAAAA" /> <img id="optionHeaderColorZone" width="30" height="15" src="img/s.gif" style="border: 1px solid grey;background-color: #AAAAAA;vertical-align: middle; margin-bottom: 3px" /><input id="optionHeaderInputColor" type="text" value="#AAAAAA" style="margin-left:2px;width:65px" /><input id="optionHeaderBackgroundNoColor" type="radio" name="optionHeaderBackgroundColorRadio" style="margin-left: 5px"/> <label for="optionHeaderBackgroundNoColor">'+_("Default")+'</label><input id="optionHeaderBackgroundTransparent" type="radio" name="optionHeaderBackgroundColorRadio" style="margin-left:5px"/> <label for="optionHeaderBackgroundTransparent">'+_("Transparent")+'</label></div><fieldset class="autoclear"><legend>'+_("Text color")+'</legend><input id="optionHeaderTextColor" name="headerTextColor" value="#AAAAAA" type="radio" style="margin-right:5px" /><img id="optionHeaderColorZoneText" width="30" height="15" src="img/s.gif" style="border: 1px solid grey;background-color: #AAAAAA;vertical-align: middle; margin-bottom: 3px"/><input id="optionHeaderTextColorHexa" type="text" value="#AAAAAA" style="margin-left: 2px; width:65px" /><input id="optionHeaderTextNoColor" name="headerTextColor" value="none" type="radio" style="margin:0 5px" /><label for="optionHeaderTextNoColor">'+_("Default")+'</label></fieldset><fieldset class="autoclear"><legend>'+_("Header height")+'</legend><div id="optionHeaderSlider" class="slider" style="width:'+E+'px;margin-top:10px;margin-bottom:10px;height:5px;position:relative;"><div id="optionHeaderCursor" class="cursor" style="position:absolute;left:0px;top:-6px;"></div></div></fieldset><div id="advanceHeaderOptions" style="display:none;"><fieldset style=\'margin-top:10px\'><legend>'+_("Advanced options")+"</legend>"+_("Display mode:")+' <select id="optionHeaderDisplayMode" style="margin-right:20px"><option value="center">'+_("center")+'</option><option value="tile">'+_("tile")+"</option></select>"+_("Alignment:")+' <select id="optionHeaderAlignment"><option value="top">'+_("top")+'</option><option value="middle">'+_("middle")+'</option><option value="bottom">'+_("bottom")+"</option></select> </fieldset></div>";I.innerHTML+='<table width="100%"><tr><td><a id="optionHeaderdAdvancedLink" class="advanced" href="#">'+_("Show advanced options")+'</a></td><td align="right"><a id="optionHeaderRestoreLink" href="#">'+_("Restore defaults")+"</a></td></tr></table>";this.contentNode.appendChild(I);var T=$("optionHeaderUrl");var U=$("optionHeaderUrlApply");var P=$("optionHeaderDisplayMode");var M=$("optionHeaderColorZone");var J=$("optionHeaderBackgroundColorRadio");var V=$("optionHeaderInputColor");var H=$("optionHeaderBackgroundNoColor");var G=$("optionHeaderBackgroundTransparent");var L=$("optionHeaderTextColor");var O=$("optionHeaderTextColorHexa");var Q=$("optionHeaderTextNoColor");var N=$("optionHeaderDisplayMode");var A=$("optionHeaderAlignment");var M=$("optionHeaderColorZone");M.style.cursor="pointer";var F=$("optionHeaderColorZoneText");F.style.cursor="pointer";var B=$("optionHeaderdAdvancedLink");var C=$("optionHeaderRestoreLink");if(App.userCustom.headerCenter){P.value="center"}else{P.value="tile"}if(App.userCustom.headerAlignment){A.value=App.userCustom.headerAlignment}else{A.value="middle"}if(App.userCustom.headerColor){if(App.userCustom.headerColor=="transparent"){G.checked="checked"}else{J.value=App.userCustom.headerColor;V.value=App.userCustom.headerColor;J.checked="checked";M.style.backgroundColor=App.userCustom.headerColor}}else{H.checked="checked"}if(App.userCustom.headerTextColor){L.checked="checked";L.value=App.userCustom.headerTextColor;F.style.backgroundColor=App.userCustom.headerTextColor;O.value=App.userCustom.headerTextColor}else{Q.checked="checked";F.style.backgroundColor="#AAAAAA"}P.onchange=function(){if(this.value=="center"){App.userCustom.headerCenter=1}else{delete App.userCustom.headerCenter}App.saveUserCustom();Netvibes.Settings.Wallpaper.Header.update()};A.onchange=function(){if(this.value!="middle"){App.userCustom.headerAlignment=this.value}else{delete App.userCustom.headerAlignment}App.saveUserCustom();Netvibes.Settings.Wallpaper.Header.update()};M.onclick=function(W){Netvibes.UI.showColorPicker(this.parentNode,{color:App.userCustom.headerColor,onSelectionChange:function(X){V.value="#"+X;J.value="#"+X;M.style.backgroundColor="#"+X;J.click()}})};V.onblur=function(){if(App.userCustom.headerColor==this.value){return false}M.style.backgroundColor=this.value;J.value=this.value;J.click()};J.onclick=function(){App.userCustom.headerColor=this.value;delete App.userCustom.headerBackground;App.saveUserCustom();Netvibes.Settings.Wallpaper.Header.update()};H.onclick=function(){delete App.userCustom.headerColor;delete App.userCustom.headerBackground;App.saveUserCustom();Netvibes.Settings.Wallpaper.Header.update()};G.onclick=function(){App.userCustom.headerColor="transparent";delete App.userCustom.headerBackground;App.saveUserCustom();Netvibes.Settings.Wallpaper.Header.update()};C.onclick=function(W){H.checked="checked";delete App.userCustom.headerColor;P.value="tile";delete App.userCustom.headerCenter;$("optionHeaderUrl").value="";delete App.userCustom.headerHeight;R.style.left="0px";delete App.userCustom.headerTextColor;Q.checked="checked";$("optionHeaderUrl").value="";$("optionHeaderUrlApply").click();return false};B.onclick=function(){var Y=$(K.contentNode).getElementsByClassName("listThemes");if($("advanceHeaderOptions").style.display=="block"){var W=53;this.innerHTML=_("Show advanced options");$("advanceHeaderOptions").style.display="none"}else{var W=-53;this.innerHTML=_("Hide advanced options");$("advanceHeaderOptions").style.display="block"}var Z=Y.length;for(var X=0;X<Z;X++){Y[X].style.height=(parseInt(Y[X].style.height)+W)+"px"}return false};F.onclick=function(W){Netvibes.UI.showColorPicker(this.parentNode,{color:App.userCustom.headerTextColor,onSelectionChange:function(X){O.value="#"+X;L.value="#"+X;F.style.backgroundColor="#"+X;L.click()}})};L.onclick=function(){App.userCustom.headerTextColor=this.value;App.saveUserCustom();Netvibes.Settings.Wallpaper.Header.update()};O.onblur=function(){F.style.backgroundColor=this.value;L.value=this.value;L.click()};Q.onclick=function(){delete App.userCustom.headerTextColor;App.saveUserCustom();Netvibes.Settings.Wallpaper.Header.update()};var R=$("optionHeaderCursor");R.style.cursor="pointer";var E=425;if(Browser.isIE&&Browser.version<7){E=410;R.style.background="#CCCCCC"}if(App.userCustom.headerHeight){R.style.left=Math.floor(E*parseInt(App.userCustom.headerHeight)/150)+"px"}R.onmousedown=function(X){if(!X){X=window.event}this.drag=true;var W=this;var Y=(X.clientX-parseInt(this.style.left));Event.stop(X);document.onmousemove=function(a){if(!a){a=window.event}if(!W.drag){return }if((a.clientX-Y)<0){var Z=0}else{if((a.clientX-Y)>E){var Z=E}else{var Z=(a.clientX-Y)}}W.style.left=Z+"px";var Z=Math.floor((Z/E*150)/2);$("topLinks").style.marginBottom=Z+"px";$("divTabs").style.marginTop=Z+"px";Event.stop(a)};document.onmouseup=function(){if(!W.drag){return }W.drag=false;var Z=parseInt(W.style.left);var Z=Math.floor(Z/E*150);if(Z==0){delete App.userCustom.headerHeight}else{App.userCustom.headerHeight=Z}Z=Math.ceil(Z/2);$("topLinks").style.marginBottom=Z+"px";$("divTabs").style.marginTop=Z+"px";App.saveUserCustom()}}},onTabChange:function(J,A){var K=this.contentNode.getElementsByTagName("div")[0].childNodes;var I=K.length;for(var F=0;F<I;F++){K[F].style.display="none"}var C=K[J];C.style.display="block";if(Browser.isIE){C.style.padding="0px 5px 0px 5px"}else{C.style.padding="0px 5px 10px 5px"}var L=this;switch(A){case"flickr":if(!C.loaded){C.innerHTML='<form><img src="/img/flickr.png" style="vertical-align:top;margin-right:2px" /><input value="background" type="text" style="width:200px;"/><input class="submit" type="submit" value="'+_("search")+'" /><div class="listThemes" style="margin-top:5px;margin-left:-5px;width:439px;height:132px;">'+_("Loading...")+"</div></form>";var H=C.getElementsByTagName("input");var B=C.firstChild;B.onsubmit=function(){var N=new Request({onSuccess:L.displayFlickr.bind(L)}).get("/data/flickr/index.php",{q:H[0].value.replace(/\s/g,","),random:Math.random()});var M=$(C).getElementsByClassName("listThemes")[0];M.innerHTML=_("Loading...");return false};var E=new Request({onSuccess:L.displayFlickr.bind(L)}).get("/data/flickr/index.php",{q:"background",random:Math.random()});C.loaded=true}break;case"url":if(!C.loaded){C.innerHTML="<br/><form onsubmit='return false;'>"+_("Address (URL):")+' <input id="optionHeaderUrl" type="text" style="width:220px" /><input id="optionHeaderUrlApply" type="button" value="'+_("Apply")+'"/></form><div style="margin-top:15px"></div>';var G=$("optionHeaderUrl");var D=$("optionHeaderUrlApply");if(typeof App.userCustom.headerBackground!="undefined"){G.value=App.userCustom.headerBackground}D.onclick=function(){var M=this.parentNode.nextSibling;if(G.value==""){delete App.userCustom.headerBackground;M.innerHTML=""}else{App.userCustom.headerBackground=G.value;M.innerHTML="<p align='center'><img width='50' height='50' src='"+G.value+"' /></p>"}if($("optionHeaderBackgroundTransparent")&&$("optionHeaderBackgroundNoColor")&&$("optionHeaderBackgroundTransparent").checked){$("optionHeaderBackgroundNoColor").checked="checked";delete App.userCustom.headerColor}App.saveUserCustom();Netvibes.Settings.Wallpaper.Header.update();return false}}C.loaded=true;break;case"netvibes":if(!C.loaded){C.innerHTML='<div class="listThemes" style="margin-top:5px;margin-left:-5px;width:439px;height:152px;">'+_("Loading...")+"</div>";window.setTimeout(function(){var M=[{src:"/img/headers/thumbs/_blank.gif",src_o:"/img/headers/_blank.gif"},{src:"/img/headers/thumbs/4seasons.jpg",src_o:"/img/headers/4seasons.jpg"},{src:"/img/headers/thumbs/love.jpg",src_o:"/img/headers/love.jpg"},{src:"/img/headers/thumbs/sea.png",src_o:"/img/headers/sea.png"},{src:"/img/headers/thumbs/cupcake.png",src_o:"/img/headers/cupcake.png"},{src:"/img/headers/thumbs/palm.jpg",src_o:"/img/headers/palm.jpg"},{src:"/img/headers/thumbs/candy.jpg",src_o:"/img/headers/candy.jpg"},{src:"/img/headers/thumbs/paris.jpg",src_o:"/img/headers/paris.jpg"},{src:"/img/headers/thumbs/drops.jpg",src_o:"/img/headers/drops.png"},{src:"/img/headers/thumbs/flower.jpg",src_o:"/img/headers/flower.png"},{src:"/img/headers/thumbs/red.jpg",src_o:"/img/headers/red.jpg"},{src:"/img/headers/thumbs/black-stripes.png",src_o:"/img/headers/black-stripes.png"},{src:"/img/headers/thumbs/tartan-prune.png",src_o:"/img/headers/tartan-prune.png"},{src:"/img/headers/thumbs/clouds.png",src_o:"/img/headers/clouds.png"},{src:"/img/headers/thumbs/grass.png",src_o:"/img/headers/grass.png"},{src:"/img/headers/thumbs/grunge01.png",src_o:"/img/headers/grunge01.png"},{src:"/img/headers/thumbs/halloween.jpg",src_o:"/img/headers/halloween.jpg"},{src:"/img/headers/thumbs/ornament.png",src_o:"/img/headers/ornament.png"},{src:"/img/headers/thumbs/stars01.jpg",src_o:"/img/headers/stars01.jpg"},{src:"/img/headers/thumbs/sweet.png",src_o:"/img/headers/sweet.png"}];L.displayNetvibes(M)},10)}C.loaded=true;break;case"myspace":if(!C.loaded){C.innerHTML='<br/><form><img src="/modules/myspace/icon-myspace.gif" style="vertical-align:top;margin-right:2px" /> http://www.myspace.com/<input value="" type="text" style="width:100px"/><input class="submit" type="submit" value="'+_("Import")+'" /></form><div style="margin-top:15px"></div>';var H=C.getElementsByTagName("input");H[1].onclick=function(){this.parentNode.nextSibling.innerHTML=_("Loading...");var M=new Request({onSuccess:L.displayMyspace.bind(L)}).get("/ajax/settings/get/myspace.php",{q:H[0].value});return false};C.loaded=true}break;case"twitter":if(!C.loaded){C.innerHTML='<br/><form><img src="/img/sendModule/twitter.gif" style="vertical-align:top;margin-right:2px" /> http://www.twitter.com/<input value="" type="text" style="width:100px"/><input class="submit" type="submit" value="'+_("Import")+'" /></form><div style="margin-top:15px"></div>';var H=C.getElementsByTagName("input");H[1].onclick=function(){this.parentNode.nextSibling.innerHTML=_("Loading...");var M=new Request({onSuccess:L.displayTwitter.bind(L)}).get("/ajax/settings/get/twitter.php",{q:H[0].value});return false};C.loaded=true}break}},displayNetvibes:function(responseText){if(typeof responseText==="object"){var json=responseText}else{try{var json=eval("("+responseText+")")}catch(e){var json=[]}}var tabContent=this.contentNode.getElementsByTagName("div")[0].childNodes[0];var container=tabContent.getElementsByTagName("div")[0];var newContainer=document.createElement("div");container.innerHTML="";container.appendChild(newContainer);var ln=json.length;var self=this;for(var i=0;i<ln;i++){var div=document.createElement("div");div.className="themeItem";div.style.margin="3px";div.innerHTML='<p><a href="javascript:void(0)" class="switcher"><img width="75" height="75" indexI="'+i+'" src="'+App.getStaticUrl(json[i].src)+'" /></a></p>';if(App.userCustom.headerBackground&&App.userCustom.headerBackground==json[i].src_o){Element.addClassName(div.firstChild.firstChild,"selected")}div.getElementsByTagName("a")[0].onclick=function(e){var links=$(self.contentNode).getElementsByClassName("switcher");$A(links).each(function(link){Element.removeClassName(link,"selected")});Element.addClassName(this,"selected");var i=this.firstChild.getAttribute("indexI");var scroll=container.scrollTop;var url=json[i].src_o;$("optionHeaderDisplayMode").value="tile";delete App.userCustom.headerCenter;if(url=="/img/headers/_blank.gif"){self.switchBackground()}else{self.switchBackground(url)}container.scrollTop=scroll;return false};newContainer.appendChild(div)}var hr=document.createElement("hr");hr.style.clear="both";hr.style.visibility="hidden";newContainer.appendChild(hr)},displayFlickr:function(responseText){try{var json=eval("("+responseText+")")}catch(e){var json=[]}var tabContent=this.contentNode.getElementsByTagName("div")[0].childNodes[2];var container=tabContent.getElementsByTagName("div")[0];container.innerHTML="";var newContainer=document.createElement("div");container.appendChild(newContainer);var ln=json.length;if(ln==0){container.innerHTML=_("No result for this search.")}var self=this;for(var i=0;i<ln;i++){var div=document.createElement("div");div.className="themeItem";div.style.margin="3px";div.innerHTML='<p><a href="javascript:void(0)" class="switcher"><img indexI="'+i+'" src="'+json[i].src+'" /></a></p>';div.getElementsByTagName("a")[0].onclick=function(e){var links=$(self.contentNode).getElementsByClassName("switcher");$A(links).each(function(link){Element.removeClassName(link,"selected")});Element.addClassName(this,"selected");var i=this.firstChild.getAttribute("indexI");var scroll=container.scrollTop;var url=json[i].src_o;self.switchBackground(url);container.scrollTop=scroll;return false};div.getElementsByTagName("a")[0].href=json[i].href;div.getElementsByTagName("a")[0].name=_("Author:")+" "+json[i].authorName+" ("+json[i].src_o_w+"*"+json[i].src_o_h+")";div.getElementsByTagName("a")[0].title=_("Author:")+" "+json[i].authorName+" ("+json[i].src_o_w+"*"+json[i].src_o_h+")";newContainer.appendChild(div)}var hr=document.createElement("hr");hr.style.clear="both";hr.style.visibility="hidden";newContainer.appendChild(hr)},displayMyspace:function(C){var A=C;var B=this.contentNode.getElementsByTagName("div")[0].childNodes[3];var D=B.getElementsByTagName("div")[0];D.className="";if(A=="error"){D.className="error";D.innerHTML=_("Error! Please Check if this myspace has a background image")}else{D.innerHTML=_("Background image has been imported");D.innerHTML+="<br/><p align='center'><img width='50' height='50' src='"+A+"' /></p>";this.switchBackground(A)}},displayTwitter:function(C){var A=C;var B=this.contentNode.getElementsByTagName("div")[0].childNodes[4];var D=B.getElementsByTagName("div")[0];D.className="";if(A=="error"){D.className="error";D.innerHTML=_("Error")}else{D.innerHTML=_("Background image has been imported");D.innerHTML+="<br/><p align='center'><img width='50' height='50' src='"+A+"' /></p>";this.switchBackground(A)}},switchBackground:function(A){if(typeof A=="undefined"){$("optionHeaderUrl").value="";delete App.userCustom.headerBackground}else{$("optionHeaderUrl").value=A;App.userCustom.headerBackground=A}if($("optionHeaderBackgroundTransparent")&&$("optionHeaderBackgroundNoColor")&&$("optionHeaderBackgroundTransparent").checked){$("optionHeaderBackgroundNoColor").checked="checked";delete App.userCustom.headerColor}App.saveUserCustom();Netvibes.Settings.Wallpaper.Header.update()}};
Netvibes.Settings.Wallpaper.Header.update=function(){
	var A=$("header").style.paddingLeft;$("header").setAttribute("style","");$("header").style.paddingLeft=A;if(App.userCustom.headerBackground){$("header").style.backgroundImage="url("+App.userCustom.headerBackground+")";if(App.userCustom.headerCenter){$("header").style.backgroundRepeat="no-repeat"}else{$("header").style.backgroundRepeat="repeat"}if(App.userCustom.headerAlignment){$("header").style.backgroundPosition=App.userCustom.headerAlignment+" center"}else{$("header").style.backgroundPosition="center center"}}else{$("header").style.backgroundRepeat="";$("header").style.backgroundImage="url(img/s.gif)"}if(App.userCustom.headerColor){$("header").style.backgroundColor=App.userCustom.headerColor;if(!App.userCustom.headerBackground){$("header").style.backgroundImage="url(img/s.gif)"}}else{$("header").style.backgroundColor=""}if(App.userCustom.headerHeight){$("topLinks").style.marginBottom=Math.ceil(App.userCustom.headerHeight/2)+"px";$("divTabs").style.marginTop=Math.ceil(App.userCustom.headerHeight/2)+"px"}if(App.userCustom.headerTextColor){var C=App.userCustom.headerTextColor}else{var C=""}$("topLinks").style.color=C;$("pageTitle").style.color=C;$("aNewTab").style.color=C;var B=$("topLinks").getElementsByTagName("a");var E=B.length;for(var D=0;D<E;D++){B[D].style.color=C}};;

//57
if(typeof Netvibes=="undefined"||!Netvibes){var Netvibes={}}
Netvibes.Vibes=[];
Netvibes.Vibes.push({name:"web",title:_("Web Search"),icon:App.getStaticUrl(NV_PATH+"img/search.gif"),type:"Netvibes.Vibes.Engine",enabled:true});
Netvibes.Vibes.push({
	name:"blog",title:_("Blog Search"),icon:App.getStaticUrl(NV_PATH+"img/blogsearch.png"),type:"Netvibes.Vibes.Engine",enabled:true});
Netvibes.Vibes.push({
	name:"image",title:_("Images Search"),icon:NV_PATH+"modules/imagesSearch/favicon.png",type:"Netvibes.Vibes.Engine",enabled:true});
Netvibes.Vibes.push({
	name:"video",title:_("Video Search"),icon:App.getStaticUrl(NV_PATH+"img/video-player.gif"),type:"Netvibes.Vibes.Engine",enabled:true});
Netvibes.Vibes.push({
	name:"podcast",title:_("Podcast Search"),icon:NV_PATH+"img/speaker.gif",type:"Netvibes.Vibes.Engine",enabled:true});
Netvibes.Vibes.push({
	name:"shopping",title:_("Shopping Search"),icon:App.getStaticUrl(NV_PATH+"img/cart.gif"),type:"Netvibes.Vibes.Engine",enabled:true});
Netvibes.checkVibes=function(B){
	var A={ImagesSearch:"image",BlogSearch:"blog",WebSearch:"web",PodcastSearch:"podcast",Video:"video",ShoppingSearch:"shopping"};if(typeof A[B]!="undefined"){return{type:A[B],name:"Vibes"}}return false};
Netvibes.VibesPanel=new Class({
	Extends:ModalDialog,initialize:function(element,options){this.parent(element,options);this.pages=[];this.selectedIndex=0;this.listElement=null;this.paneElement=null;this.heading.innerHTML=_("Manage Search Engines");for(var i=0,module;module=App.moduleList[i];i++){if(module.dataObj.tab==App.selectedTab&&module.widget&&module.widget.pub&&module.widget.pub.fixId==this.options.fixModuleId){this.module=module.widget.pub}}this.listElement=document.createElement("ol");this.listElement.className="settings";for(var i=0,setting;setting=Netvibes.Vibes[i];i++){var item=document.createElement("li");var icon=document.createElement("img");icon.src=setting.icon;var link=document.createElement("a");link.href="javascript:void(0)";link.innerHTML='<img style="margin-bottom: -4px; margin-right: 4px" src="'+setting.icon+'" />'+setting.title;link.setAttribute("hidefocus","hidefocus");link.setAttribute("selectedIndex",i);item.appendChild(link);this.listElement.appendChild(item);if(setting.enabled){link.onclick=this.onSelectionChanged.bindAsEventListener(this);this.pages.push({name:setting.name,index:i,manager:eval("new "+setting.type+"(setting.name, this.options.fixModuleId)"),contentNode:null})}else{link.className="disabled"}}this.container.appendChild(this.listElement);this.paneElement=document.createElement("div");this.paneElement.className="page";this.container.appendChild(this.paneElement);var bottomDiv=document.createElement("div");bottomDiv.className="bottom";this.container.appendChild(bottomDiv);var inputDone=document.createElement("input");inputDone.style.cssFloat=inputDone.style.styleFloat=App.rtl?"left":"right";inputDone.type="button";inputDone.className="done";Element.addClassName(inputDone,"button");inputDone.value=_("Done");inputDone.onclick=this.hide.bindAsEventListener(this);bottomDiv.appendChild(inputDone)},localeOptionChecked:function(){for(var A=0,B;B=this.pages[A];A++){if(B.index==this.selectedIndex){B.manager.module.toggleShowLocalEngines();B.manager.activate();break}}},getContent:function(){},getPageIndex:function(A){if(typeof A=="string"){return Netvibes.Vibes.detect(function(B){return B.name==A})}return A},setCurrentPage:function(B){if(typeof (B)=="string"&&B.length>3){var C=this.pages.detect(function(F){return F.name==B});B=C?C.index:0}this.selectedIndex=B;$A(this.listElement.getElementsByTagName("a")).each(function(G,F){if(G.getAttribute("selectedIndex")==B){Element.addClassName(G,"selected")}else{Element.removeClassName(G,"selected")}});for(var A=0,D;D=this.pages[A];A++){if(D.index==B){D.manager.setFixModuleId(this.options.fixModuleId);if(D.contentNode==null||D.manager.forceLoad){D.contentNode=D.manager.load();this.paneElement.appendChild(D.contentNode);if(typeof (D.manager.loaded)=="function"){D.manager.loaded()}}Element.show(D.contentNode);if(typeof (D.manager.activate)=="function"){try{D.manager.activate()}catch(E){}}}else{if(D.contentNode){Element.hide(D.contentNode)}}}},onSelectionChanged:function(C){var B=Event.element(C);var A=B.getAttribute("selectedIndex");this.setCurrentPage(A)},onShow:function(){App.keyboardFocus="settings"},onClose:function(){App.keyboardFocus="module";for(var A=0,B;B=this.pages[A];A++){if(B.index==this.selectedIndex){B.manager.module.updateVibes();break}}}});
	
Netvibes.Vibes.Engine=Class.create();
Netvibes.Vibes.Engine.prototype={
	initialize:function(A,B){this.name=A;this.setFixModuleId(B)},setFixModuleId:function(C){for(var B=0,A;A=App.moduleList[B];B++){if(A.dataObj.tab==App.selectedTab&&A.widget&&A.widget.pub&&A.widget.pub.fixId==C){this.module=A.widget.pub}}},load:function(){this.contentNode=document.createElement("div");this.contentNode.innerHTML=_("Loading ...");var A=new Ajax.Request(NV_PATH+"get/paneVibes.php",{method:"post",postBody:"pane="+this.name,onSuccess:this.attachEvents.bind(this)});return this.contentNode},activate:function(){if(typeof this.contentNode.getElementsByTagName("li")[0]!="undefined"){var F=this.contentNode.getElementsByTagName("li");this.lastEngine="";for(var D=0;F[D];D++){var A=F[D].getElementsByTagName("a")[0];var B=F[D].getAttribute("vibesid");var G=F[D].getAttribute("vibesname");var C=F[D].getAttribute("vibeslocale");var E=F[D].getElementsByTagName("a")[0];Element.removeClassName(E,"selected");if(this.module.containVibes(B)){Element.addClassName(E,"selected");F[D].setAttribute("title",_("click to unselect"))}else{F[D].setAttribute("title",_("click to select"))}F[D].style.display="block"}}},attachEvents:function(B){this.contentNode.innerHTML=B.responseText;var D=this.contentNode.getElementsByTagName("ul")[0];var G=this.contentNode.getElementsByTagName("li");this.lastEngine="";for(var C=0;G[C];C++){if(User.locale=="cn"||App.locale=="cn"){var F=G[C].getAttribute("vibesname");if(typeof F!="undefined"&&/^(flickr|imtv|dailymotion|wikipedia|youtube)$/.test(F)){D.removeChild(G[C]);continue}}var A=G[C].getAttribute("vibesid");if(this.module.containVibes(A)){var E=G[C].getElementsByTagName("a")[0];Element.addClassName(E,"selected");G[C].setAttribute("title",_("click to unselect"))}else{G[C].setAttribute("title",_("click to select"))}G[C].onclick=this.toggleVibes.bindAsEventListener(this);G[C].style.display="block"}},toggleVibes:function(D){var B=Event.findElement(D,"LI");var A;if((A=this.module.toggleVibes(B.getAttribute("vibesid")))==true){var C=B.getElementsByTagName("a")[0];if(Element.hasClassName(C,"selected")){Element.removeClassName(C,"selected");B.setAttribute("title",_("click to select"))}else{Element.addClassName(C,"selected");B.setAttribute("title",_("click to unselect"))}}else{alert(A)}},displayLocalEngines:function(B){var C=B.getAttribute("vibesname");var A=B.getAttribute("vibeslocale");if((A==User.locale||A==App.locale||A=="")&&this.lastEngine!=C){B.style.display="block";this.lastEngine=C}else{B.style.display="none"}}};
window._vibesPanel=null;
var VibesPanel={};
VibesPanel.open=function(B,A){
	if(App.inSubscribePreview==true){return alert(_("Not avaible in preview mode."))}if(window._vibesPanel==null){window._vibesPanel=new Netvibes.VibesPanel("nv-vibes",{overlayClassName:"overlay_settings",fixModuleId:B})}window._vibesPanel.options.fixModuleId=B;window._vibesPanel.show();if(typeof A=="undefined"){A=window._vibesPanel.selectedIndex||0}window._vibesPanel.setCurrentPage(A)};
VibesPanel.close=function(){
	if(window._vibesPanel){window._vibesPanel.hide()}};
VibesPanel.isOpen=function(){return(window._vibesPanel&&window._vibesPanel.isVisible())};;

//58
if(typeof window.NV_HOST=="undefined"){NV_HOST="www.netvibes.com"}
if(typeof window.NV_AVATARS=="undefined"){NV_AVATARS="avatars.netvibes.com"}
if(typeof window.NV_STATIC=="undefined"){NV_STATIC="http://"+NV_HOST}
if(typeof window.NV_PATH=="undefined"){NV_PATH="http://"+NV_HOST+"/"}
if(typeof UWA=="undefined"){var UWA={}}
if(typeof UWA.Widgets=="undefined"){UWA.Widgets={}}
if(typeof UWA.Controls=="undefined"){UWA.Controls={}}
if(typeof UWA.Services=="undefined"){UWA.Services={}}
if(typeof UWA.Templates=="undefined"){UWA.Templates={}}UWA.version="1.2";
if(typeof Netvibes=="undefined"){var Netvibes={}}
if(typeof Netvibes.UI=="undefined"){Netvibes.UI={}}
Netvibes.UI._idIncrement=0;UWA.Controls=Netvibes.UI;
if(Netvibes.DLA){UWA.Controls.SearchForm=Netvibes.DLA.SearchForm}
if(typeof _=="undefined"){_=function(A){return A}}
UWA.extend=function(C,A){for(var B in (A||{})){C[B]=A[B]}return C};
UWA.merge=function(){for(var A in arguments[1]){if(typeof arguments[0][A]=="undefined"){arguments[0][A]=arguments[1][A]}}return arguments[0]};
UWA.log=function(A){
	if(window.console&&typeof (console.log)=="function"){console.log(A)}else{if(window.opera&&typeof (opera.postError)=="function"){opera.postError(A)}}};;

//59
UWA.Class=Class;
UWA.Form={getElements:function(A){return $(A).getElements("input, textarea, select")}};
UWA.Ajax={
	getRequest:function(B,A){A.url=B;if(A.postBody){A.data=A.postBody;A.urlEncoded=false;delete A.postBody}else{if(A.parameters){A.data=A.parameters;delete A.parameters}}if(A.method){A.method=A.method.toLowerCase()}if(A.requestHeaders){A.headers=A.requestHeaders;delete A.requestHeaders}if(A.headers){A.headers["X-Requested-With"]="XMLHttpRequest"}return new Request(A)},Request:function(B,A){var C=this.getRequest(B,A);return C.send()},onCompleteXML:function(A,C,B){if(typeof C=="function"){C(A[1])}},onCompleteText:function(A,C,B){if(typeof C=="function"){C(A[0])}},onCompleteFeed:function(A,E,C){var B={responseText:A[0],responseXML:A[1]};var D=UWA.Utils.parseFeed(B);if(typeof E=="function"){E(D)}},onCompleteJson:function(arg,callback,context){try{eval("var j = "+arg[0]);if(typeof callback=="function"){callback(j,context)}}catch(e){UWA.log(e)}}};
UWA.createElement=function(B,A){
	return UWA.$element(new Element(B,A))};
UWA.extendElement=function(A){
	if(A){A=$(A);if(!A.isUwaExtended){UWA.merge(A,UWA.Element);A.isUwaExtended=true}return A}};
UWA.$element=UWA.extendElement;
if(typeof UWA.Element=="undefined"){UWA.Element={}}
UWA.extend(UWA.Element,{setAttributes:function(A){return this.setProperties(A)}});
if(typeof UWA.Json=="undefined"){UWA.Json={}}
UWA.Json.encode=JSON.encode;
UWA.Json.decode=function(A){return JSON.decode(A,true)};;

//60
UWA.merge(
	String.prototype,{stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},truncate:function(B,A){B=B||30;A=A===undefined?"...":A;return this.length>B?this.slice(0,B-A.length)+A:String(this)},escapeRegExp:function(){return this.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},trim:function(){return this.replace(/^\s+|\s+$/g,"")},isEmail:function(){var A=/^([a-zA-Z0-9_.\-+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;return A.test(this)},s:function(){var F=this;if(arguments.length<1){return F}var C=/([^%]*)%s(.*)/;var A=[],B=-1;while(A=C.exec(F)){var D=A[1],E=A[2];if(++B>=arguments.length){break}F=D+arguments[B]+E}return F},format:function(){var A=arguments;return this.replace(/\{(\d+)\}/g,function(B,C){return A[C]})},parseRelativeTime:function(B,E){if(typeof E!="number"){E=0}var D=(B&&B.match(/^(\d\d\d\d)\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/));if(!D){return false}var A=new Date(D[1],D[2]-1,D[3],D[4],D[5],D[6]);var C=new Date();var F=parseInt((C.getTime()-A.getTime())/1000);F=F+(C.getTimezoneOffset()*60+3600*E);if(F<60){return _("less than a minute ago")}else{if(F<120){return _("about a minute ago")}else{if(F<(45*60)){return _("{0} minutes ago").format(Math.round(F/60))}else{if(F<(90*60)){return _("about an hour ago")}else{if(F<(24*60*60)){return _("about {0} hours ago").format(Math.round(F/3600))}else{if(F<(48*60*60)){return _("yesterday")}else{return _("{0} days ago").format(Math.round(F/86400))}}}}}}},contains:function(A,B){return(B)?(B+this+B).indexOf(B+A+B)>-1:this.indexOf(A)>-1},camelCase:function(){return this.replace(/-\D/g,function(A){return A.charAt(1).toUpperCase()})},makeClickable:function(){var A=this.split("<br>");for(var D=0;D<A.length;D++){var C=A[D].split(" ");for(var B=0;B<C.length;B++){if(C[B].indexOf("www.")!=-1&&C[B].indexOf("http://")==-1&&C[B].indexOf("https://")==-1){C[B]="<a href='http://"+C[B]+"' target='_blank'>"+C[B]+"</a>"}else{if(C[B].indexOf("http://")!=-1||C[B].indexOf("ftp://")!=-1||C[B].indexOf("https://")!=-1){C[B]="<a href='"+C[B]+"' target='_blank'>"+C[B]+"</a>"}}}A[D]=C.join(" ")}return A.join("<br>")}});
String.format=function(B){
	var A=Array.prototype.slice.call(arguments,1);return B.format(A)};
String.parseRelativeTime=String.prototype.parseRelativeTime;;

//61
UWA.merge(
	Array.prototype,{forEach:function(C,D){for(var B=0,A=this.length;B<A;B++){C.call(D,this[B],B,this)}},filter:function(D,E){var C=[];for(var B=0,A=this.length;B<A;B++){if(D.call(E,this[B],B,this)){C.push(this[B])}}return C},map:function(D,E){var C=[];for(var B=0,A=this.length;B<A;B++){C[B]=D.call(E,this[B],B,this)}return C},every:function(C,D){for(var B=0,A=this.length;B<A;B++){if(!C.call(D,this[B],B,this)){return false}}return true},some:function(C,D){for(var B=0,A=this.length;B<A;B++){if(C.call(D,this[B],B,this)){return true}}return false},indexOf:function(C,D){var A=this.length;for(var B=(D<0)?Math.max(0,A+D):D||0;B<A;B++){if(this[B]===C){return B}}return -1}});
UWA.merge(
	Array.prototype,{normalize:function(D){var A=0;var C=D/this.inject(0,function(E,F){return E+F});for(var B=0;B<this.length-1;B++){A+=(this[B]*=C)}this[this.length-1]=D-A},equals:function(C){if(!C){return false}var A=this.length;if(A!=C.length){return false}for(var B=0;B<A;B++){if(this[B]!=C[B]){return false}}return true},detect:function(B){var A;this.each(function(D,C){if(B(D,C)){A=D;return A}});return A}});
if(typeof Array.prototype.each!="function"){Array.prototype.each=Array.prototype.forEach};;

//62
if(typeof UWA.Element=="undefined"){UWA.Element={}}
UWA.merge(
	UWA.Element,{addContent:function(B){if(typeof B=="string"){UWA.log("addContent should be soon deprecated. Use alternative syntaxes.");var A=document.createElement("div");A.innerHTML=B;return this.appendChild(A)}return this.appendChild(B)},setText:function(A){this[(typeof this.innerText!="undefined")?"innerText":"textContent"]=A;return this},appendText:function(B){var A=document.createTextNode(B);return this.appendChild(A)},setHTML:function(A){this.innerHTML=A;return this},setContent:function(A){if(typeof A=="string"){this.setHTML(A)}else{if(typeof A=="object"){this.innerHTML="";this.appendChild(A)}}return this},hasClassName:function(A){return this.className.contains(A," ")},addClassName:function(A){if(!this.hasClassName(A)){this.className=(this.className+" "+A)}return this},removeClassName:function(A){this.className=this.className.replace(new RegExp("(^|\\s)"+A+"(?:\\s|$)"),"$1");return this},getParent:function(){return UWA.$element(this.parentNode)},getChildren:function(){return this.childNodes},empty:function(){this.innerHTML="";return this},hide:function(){return this.setStyle("display","none")},show:function(){return this.setStyle("display","")},toggle:function(){this.style.display=="none"?this.setStyle("display",""):this.setStyle("display","none");return this},remove:function(){return this.parentNode.removeChild(this)},getDimensions:function(){return{width:this.offsetWidth,height:this.offsetHeight}},setStyle:function(A){if(typeof A=="string"){A=A.camelCase();this.style[A]=arguments[1]}else{if(typeof styles=="string"){return this.setStyles(A)}}return this},setStyles:function(A){var C=this.style;for(var B in A){if(B=="opacity"){this.setOpacity(A[B])}else{C[(B=="float"||B=="cssFloat")?(C.styleFloat===undefined?"cssFloat":"styleFloat"):B]=A[B]}}return this},setOpacity:function(A){this.style.opacity=(A==1||A==="")?"":(A<0.00001)?0:A;return this},inject:function(B,A){if(typeof A!="undefined"){UWA.log("warning: el.inject. 2nd argument not supported. "+A)}return B.appendChild(this)},addListener:function(B,A){if(this.addEventListener){this.addEventListener(B,A,false)}else{this.attachEvent("on"+B,A)}return this}});
if(window.HTMLElement){UWA.merge(window.HTMLElement.prototype,UWA.Element)};;

//63
if(typeof UWA.proxies=="undefined"){
	UWA.proxies={api:NV_PATH+"proxy/api2Proxy.php",rss:NV_PATH+"proxy/xmlProxy.php",ajax:NV_PATH+"proxy/ajaxProxy.php",feed:NV_PATH+"proxy/feedProxy.php",xml:NV_PATH+"data/xml/"}}
if(typeof UWA.Json=="undefined"){UWA.Json={}}
UWA.Json.request=function(url,request){
	var varname="json";
	if(request.context&&request.context[0]){varname+=request.context[0]}else{varname+=Math.round(1000*1000*Math.random())}eval(varname+"= false");url+="&object="+varname;var script=document.createElement("script");script.setAttribute("type","text/javascript");script.src=url;var head=document.getElementsByTagName("head")[0];var insert=head.appendChild(script);if(typeof request.onComplete=="undefined"){UWA.log("no callback set")}var callback=request.onComplete;var myCallback=function(c){return function(j){callback(j,c)}}(request.context);var interval=setInterval((function(){eval("var json = "+varname);if(json){try{myCallback(json)}catch(e){UWA.log(e)}insert.parentNode.removeChild(insert);clearInterval(interval)}}).bind(this),100)};
UWA.Data={
	useJsonRequest:false,getFeed:function(A,B){if(UWA.Feeds&&UWA.Feeds[A]){B(UWA.Feeds[A]);setTimeout(function(){UWA.Feeds[A]=null},15000);return }if(typeof UWA.feedCallbackType=="undefined"){UWA.feedCallbackType="json"}return this.request(A,{method:"GET",proxy:"feed",type:UWA.feedCallbackType,onComplete:B})},getXml:function(A,B){return this.request(A,{method:"GET",type:"xml",onComplete:B})},getText:function(A,B){return this.request(A,{method:"GET",type:"text",onComplete:B})},getJson:function(A,B){return this.request(A,{method:"GET",type:"json",onComplete:B})},getModule:function(A,C,B){if(UWA.proxies.api){A=UWA.proxies.api+"?moduleUrl="+encodeURIComponent(A);if(B){A+="&moduleId="+B}return this.request(A,{method:"GET",type:"xml",onComplete:C})}UWA.log("no proxy URL set for module");return false},request:function(A,D){if(typeof D=="undefined"){D={}}if(typeof D.method=="undefined"){D.method="GET"}if(typeof D.headers=="undefined"){D.headers={}}D.headers["X-Requested-Method"]=D.method;if(D.method=="DELETE"||D.method=="PUT"){D.method="POST"}if(typeof D.proxy=="undefined"){if(typeof D.authentication=="object"||location.hostname==""||(A.substr(0,4)=="http"&&A.indexOf("http://"+location.hostname)==-1)){D.proxy="ajax"}}if(typeof D.type=="undefined"){D.type="text"}if(UWA.proxies[D.proxy]){A=UWA.proxies[D.proxy]+"?url="+encodeURIComponent(A);if(D.proxy=="feed"&&D.shortFeed!=false){A+="&rss=1&g"}}else{if(D.proxy){UWA.log("no proxy URL set for "+D.proxy)}}if(typeof D.authentication=="object"){if(D.authentication.type){A+="&auth="+D.authentication.type}if(D.authentication.moduleId){A+="&moduleId="+D.authentication.moduleId}if(D.authentication.username){A+="&username="+encodeURIComponent(D.authentication.username)}if(D.authentication.password){A+="&password="+encodeURIComponent(D.authentication.password)}if(D.authentication.gp){A+="&gp="+D.authentication.gp}}if(D.type&&D.proxy){A+="&type="+D.type}if(typeof D.cache!="undefined"){A+="&cache="+D.cache}if(UWA.Client.Engine.ie){A+="&rnd="+Math.random()}var C={xml:"onCompleteXML",feed:"onCompleteFeed",json:"onCompleteJson",text:"onCompleteText",html:"onCompleteText"};switch(D.type){case"xml":var E=D.onComplete;D.onComplete=function(){UWA.Ajax.onCompleteXML(arguments,E)};return UWA.Ajax.Request(A,D);default:if(typeof D.proxy=="undefined"||D.proxy==null){this.useJsonRequest=false}if(this.useJsonRequest&&typeof D.authentication=="undefined"){return UWA.Json.request(A,D)}else{var E=D.onComplete;var B=D.context;if(typeof UWA.Ajax[C[D.type]]=="undefined"){D.type="text"}D.onComplete=function(){UWA.Ajax[C[D.type]](arguments,E,B)};return UWA.Ajax.Request(A,D)}}}};;

//64
UWA.Environment=function(){
	this.module=null;this.widget=this.module;this.html={};this.loaded=false;this.registered=false;this.callbacks={};this.query="";this.data={};this.debugMode=false;this.periodicals={};this.delays={};this.height=200;if(this.initialize){this.initialize()}this.setPeriodical("init",this.init,100,true)};
UWA.Environment.prototype={
	init:function(){if(document.body){this.callback("onInit");this.clearPeriodical("init");this.log("Environnement loaded");this.loaded=true;return true}return false},getModule:function(){if(this.module){var A=this.module}else{var A=new UWA.Module();this.registerModule(A)}return A},registerModule:function(A){this.module=A;this.widget=this.module;A.environment=this;this.setPeriodical("register",function(){if(this.loaded){this.callback("onRegisterModule");this.registered=true;this.log("Module registered");this.clearPeriodical("register")}},100,true)},launchModule:function(){this.setPeriodical("launch",function(){if(this.loaded&&this.module&&this.registered){this.log("Launching module");this.clearPeriodical("launch");this.module.launch();if(typeof this.module.onLoadComplete!="function"){this.callback("onLoadComplete")}}},100,true)},setCallback:function(A,B){this.callbacks[A]=B},callback:function(B,A,D){if(typeof D=="undefined"){D=this}try{if(this[B]){return this[B].apply(D,[A])}if(this.callbacks[B]){return this.callbacks[B].apply(D,[A])}}catch(C){this.log(C)}return false},setPeriodical:function(B,C,A,D){this.clearPeriodical(B);C=C.bind(this);this.periodicals[B]=setInterval(C,A);if(D){C()}},clearPeriodical:function(A){if(this.periodicals[A]){clearInterval(this.periodicals[A])}},setDelayed:function(B,C,A,D){this.clearDelayed(B);if(typeof D=="undefined"||D===true){C=C.bind(this)}this.delays[B]=setTimeout(C,A)},clearDelayed:function(A){if(this.delays[A]){clearTimeout(this.delays[A])}},setIcon:function(A){if(this.module.elements.icon){this.module.elements.icon.setHTML('<img width="16" height="16" src="'+A+'" />')}},log:function(A){if(this.debugMode){UWA.log(A)}}};;

//65
UWA.Widget=function(){
	this.id="";this.environment=null;this.title="";this.body=null;this.data={};this.callbacks={};this.preferences=[];this.metas={};this.debugMode=false;this.periodicals={};this.searchResultCount=0;this.unreadCount=0;this.prefsForm=null;this.elements={};this.inline=false;this.apiVersion="1.2";this.lang="en_US";this.locale="us";this.dir="ltr";this.isNew=false;this.readOnly=false;this.theme=null;if(this.initialize){this.initialize()}};
UWA.Widget.prototype={
	setTitle:function(B,A){this.title=B;if(this.elements.title){if(A){A=" "+A+""}else{A=""}this.elements.title.setHTML(B+A)}if(this.environment&&this.environment.setTitle){this.environment.setTitle(B)}},getTitle:function(){if(this.environment&&this.environment.getTitle){return this.environment.getTitle()}return this.title.stripTags()},setBody:function(A){this.body.setContent(A);this.callback("onUpdateBody")},addBody:function(A){this.body.addContent(A);this.callback("onUpdateBody")},setIcon:function(A,B){if(this.environment.setIcon){this.environment.setIcon(A,B)}else{if(this.elements.icon&&B!==true){this.elements.icon.setHTML('<img width="16" height="16" src="'+A+'" />')}}},setElementId:function(A,B){UWA.log("widget.setElementId is deprecated");this.$(A).setAttribute("id","m_"+this.id+"_"+B)},createElement:function(B,A){if(typeof A=="string"){UWA.log("widget.createElement : elName as 2nd argument is deprecated");A={}}return UWA.createElement(B,A)},$:function(A){UWA.log("widget.$ is deprecated");if(typeof A=="string"&&this.elements[A]){A=this.elements[A]}return UWA.$element(A)},initPreferences:function(){for(var B=0;B<this.preferences.length;B++){var A=this.preferences[B];if(typeof A.name=="undefined"){continue}if(A.defaultvalue){A.defaultValue=A.defaultvalue}var C=this.getValue(A.name);if(C==undefined||C==null||C=="undefined"){if(typeof A.defaultValue!="undefined"){this.data[A.name]=A.defaultValue}else{this.data[A.name]=null}}if(A.defaultValue&&C&&A.defaultValue==C){}}},getPreference:function(A){for(var B=0;B<this.preferences.length;B++){if(this.preferences[B].name==A){return this.preferences[B]}}return null},setPreferences:function(A){if(typeof A=="object"){this.preferences=A}this.callback("onUpdatePreferences")},mergePreferences:function(A){for(var B=0;B<A.length;B++){if(this.getPreference(A[B].name)==null){this.addPreference(A[B])}}},addPreference:function(A){this.preferences.push(A)},setPreferencesXML:function(D){this.preferences=[];for(var F=0;F<D.length;F++){var E={};for(var C=0;C<D[F].attributes.length;C++){var B=D[F].attributes[C]["nodeName"];var H=D[F].attributes[C]["nodeValue"];E[B]=H}if(E.type=="list"){var A=D[F].getElementsByTagName("option");E.options=[];for(var C=0;C<A.length;C++){var G={};if(A[C].attributes[0]["value"]){G[A[C].attributes[0]["name"]]=A[C].attributes[0]["value"]}if(A[C].attributes[1]["value"]){G[A[C].attributes[1]["name"]]=A[C].attributes[1]["value"]}E.options.push(G)}}this.addPreference(E)}this.callback("onUpdatePreferences")},onEdit:function(){if(this.prefsForm){var B=this.prefsForm}else{var A=new UWA.Controls.PrefsForm({module:this});var B=A.getContent()}this.elements.edit.setContent(B);var C=this.getInfos();if(C){this.elements.edit.addContent(C)}this.callback("onShowEdit",this.elements.edit);this.elements.edit.show()},getInfos:function(){if(this.metas.author){if(this.metas.website){var A='Widget by <strong><a href="'+this.metas.website+'" rel="author">'+this.metas.author+"</a></strong>"}else{var A="Widget by <strong>"+this.metas.author+"</strong>"}if(this.metas.version){A+=" - version <strong>"+this.metas.version+"</strong>"}return this.createElement("p").setStyles({padding:"10px","text-align":"right"}).setHTML(A)}return false},endEdit:function(){this.elements.edit.hide();if(this.onRefresh){this.onRefresh()}else{if(this.onLoad){this.onLoad()}}this.callback("onHideEdit")},getValue:function(A){if(typeof this.data[A]!="undefined"){return this.data[A]}if(this.environment&&this.environment.getData){var B=this.environment.getData(A);if(B=="null"){B=null}this.data[A]=B;return B}return null},getInt:function(A){var B=this.getValue(A);if(B=="true"||B==true){B=1}B=parseInt(B,10);return isNaN(B)?0:B},getBool:function(A){return this.getInt(A)?true:false},setValue:function(B,C){if(this.data[B]==C){return C}this.data[B]=C;var A=this.getPreference(B);if(this.environment&&this.environment.setData){this.environment.setData(B,C)}return C},deleteValue:function(A){delete this.data[A];if(this.environment&&this.environment.deleteData){return this.environment.deleteData(A)}return false},saveValues:function(A){if(this.environment&&this.environment.saveDatas&&this.readOnly==false){this.environment.saveDatas(A)}else{A()}},log:function(A){if(this.debugMode===true){UWA.log(A)}},setPeriodical:function(B,C,A,D){this.clearPeriodical(B);this.periodicals[B]=setInterval(C.bind(this),A);if(D){C()}},clearPeriodical:function(A){if(this.periodicals[A]){clearInterval(this.periodicals[A])}},callback:function(B,A,D){if(typeof D=="undefined"){D=this}try{if(this[B]){this[B].apply(D,[A])}if(this.callbacks[B]){this.callbacks[B].apply(D,[A])}}catch(C){UWA.log(C)}if(this.environment&&this.environment.callback){this.environment.callback(B)}},setCallback:function(A,B){this.callbacks[A]=B},setMetas:function(A){this.metas=A;if(this.metas.debugMode){this.setDebugMode(this.metas.debugMode)}if(this.metas.autoRefresh){this.setAutoRefresh(this.metas.autoRefresh)}},setDebugMode:function(A){if(A===true||A=="true"){this.debugMode=true}else{this.debugMode=false}},setInline:function(A){UWA.log("widget.setInline is deprecated");if(A){this.inline=true}else{this.inline=false}},setAutoRefresh:function(B){var A=Math.round(10*1000*Math.random());B=parseInt(B);if(this.onRefresh&&B&&B>0){B=B*1000*60;this.setPeriodical("autoRefresh",this.onRefresh,B+A)}},setMetasXML:function(D){var E=[];for(var B=0;B<D.length;B++){if(D[B].name){var A=D[B].name}else{var A=D[B].attributes[0]["nodeValue"]}if(D[B].content){var C=D[B].content}else{var C=D[B].attributes[1]["nodeValue"]}if(C=="false"){C=false}else{if(C=="true"){C=true}}E[A]=C}this.setMetas(E)},setStyle:function(A){if(typeof A=="string"){UWA.Utils.setCss(this.id,A)}},setCSS:function(A){UWA.log("widget.setCSS is deprecated. Use widget.setStyle instead.");UWA.Utils.setCss(this.id,A)},setTemplate:function(C){UWA.log("setTemplate:"+C.name);var B=C.name;var A=new UWA.Templates[B](this);A.createFromJSON(C)},setFeeds:function(A){if(typeof UWA.Feeds=="undefined"){UWA.Feeds={}}for(key in A){UWA.Feeds[key]=A[key]}},setSearchResultCount:function(A){this.searchResultCount=A;if(this.environment.setSearchResultCount){this.environment.setSearchResultCount(A)}},setUnreadCount:function(A){this.unreadCount=A;if(this.environment&&this.environment.setUnreadCount){this.environment.setUnreadCount(A)}},openURL:function(A){if(this.environment&&this.environment.openURL){this.environment.openURL(A)}else{window.open(A)}},getHistory:function(){if(this.environment&&this.environment.getHistory){return this.environment.getHistory()}else{return this.getValue("history")}},setHistory:function(A){if(this.environment&&this.environment.setHistory){this.environment.setHistory(A)}else{this.setValue("history",A)}},saveHistory:function(){if(this.environment&&this.environment.saveHistory){this.environment.saveHistory()}},addStar:function(A){if(this.environment&&this.environment.addStar){this.environment.addStar(A)}},launch:function(){this.initPreferences();this.callback("onLoad")}};

UWA.Module=UWA.Widget;;

//66
UWA.Utils={
	buildUrl:
		function(A,G){var C=A.split("://");var B=C[0];var E=C[1];var H=E.split("/");var D=H[0];var F="";for(i=1;i<H.length-1;i++){F+="/"+H[i]}if(G.split("://").length>1){return false}else{if(G.substring(0,1)=="/"){return B+"://"+D+G}else{return B+"://"+D+F+"/"+G}}},
	setTooltip:
		function(A,C,B){if(window.App&&App.toolTip){new App.toolTip(A,C,B,"left")}return false},
	setCss:
		function(F,D,C){if(typeof C=="undefined"){var C=(F&&F!=""?"#m_"+F:"")}var E="css_"+F;if(!$(E)){var B=document.createElement("style");B.setAttribute("id",E);B.setAttribute("type","text/css");var A=document.getElementsByTagName("head").item(0);A.appendChild(B)}D="\n"+D+"\n";D=D.replace(/,/g,",\n");D=D.replace(/#moduleContent/g,"");D=D.replace(/#container/g,"");D=D.replace(/\n\s*([a-zA-z0-9\.\-, :#]*)\s*([{|,])/g,"\n"+C+" $1$2");if($(E).styleSheet){$(E).styleSheet.cssText=D}else{$(E).appendChild(document.createTextNode(D))}}};;

//67
UWA.Client={Engine:{name:"unknown",version:""},Platform:{},features:{}};
UWA.Client.features.xhr=!!(window.XMLHttpRequest);
UWA.Client.features.xpath=!!(document.evaluate);
if(window.opera){UWA.Client.Engine.name="opera"}else{
	if(window.ActiveXObject){UWA.Client.Engine={name:"ie",version:(UWA.Client.features.xhr)?7:6}}else{if(!navigator.taintEnabled){UWA.Client.Engine={name:"webkit",version:(UWA.Client.features.xpath)?420:419}}else{if(document.getBoxObjectFor!=null){UWA.Client.Engine.name="gecko"}}}}
UWA.Client.Engine[UWA.Client.Engine.name]=UWA.Client.Engine[UWA.Client.Engine.name+UWA.Client.Engine.version]=true;
var platform=navigator.platform.match(/(mac)|(win)|(linux)|(nix)/i)||["Other"];
UWA.Client.Platform.name=platform[0].toLowerCase();
UWA.Client.Platform[UWA.Client.Platform.name]=true;
if(typeof Browser=="undefined"){
	var Browser={}}
if(UWA.Client.Engine.ie){
	Browser.isIE=true}else{Browser.isIE=false}if(UWA.Client.Engine.opera){Browser.isOpera=true}else{Browser.isOpera=false};;

//68
UWA.merge(
	UWA.Utils,{
		parseFeed:function(feed){
			var is_xml=false,is_json=false;if(typeof feed.getResponseHeader=="function"||typeof feed.getResponseHeader=="unknown"){if(feed.getResponseHeader("Content-type").substr(0,8)=="text/xml"){is_xml=true}}else{if(typeof feed.responseJson=="object"&&(feed.responseJson.nvFeed==1||feed.responseJson.error==1)){is_json=true}else{if(typeof feed.responseText!="undefined"&&feed.responseText.substr(0,1)=="<"){is_xml=true}}}if(is_xml){newFeed=UWA.Utils.parseXmlFeed(feed)}else{if(is_json){newFeed=feed.responseJson}else{if(feed.responseText!=""){try{eval("newFeed = "+feed.responseText)}catch(e){UWA.log(e);return false}}else{return false}}}delete feed;feed=null;var result={};for(var i in newFeed){if(typeof newFeed.hasOwnProperty!="string"&&!newFeed.hasOwnProperty(i)){continue}result[i]=newFeed[i]}delete newFeed;newFeed=null;return result},crc32:function(F,E){if(typeof E=="undefined"){E=0}var D="00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D";var G=0;var A=0;E=E^(-1);for(var C=0,B=F.length;C<B;C++){G=(E^F.charCodeAt(C))&255;A="0x"+D.substr(G*9,8);E=(E>>>8)^A}return E^(-1)},baseConvert:function(G,H,F){var A=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];var I=G.toString().toLowerCase();var C=1;var E=0;for(i=I.length-1;i>=0;i--){b=I.charCodeAt(i);if(b>=48&&b<=57){b-=48}else{if(b>=97&&b<=122){b-=97-10}}E+=b*C;C*=H}var D="";var B=0;while(E>0){B=E%F;E=Math.floor(E/F);D=A[B]+""+D}return D},parseXmlFeed:function(D){var I={};if(D.responseText==""||D.responseXML.documentElement==null||D.responseXML.documentElement.nodeName=="parsererror"){I.error=true;return I}var F=D.responseXML.documentElement;I.type=(F.nodeName=="feed")?1:0;var O=(I.type==1)?F:F.getElementsByTagName("channel")[0];var Y=O.getAttribute("xml:lang");if(typeof Y!="undefined"&&Y){I.lang=Y}var E=UWA.Utils.getChildrenByTagName(O,"link");if(I.type==1){for(var S=0;S<E.length;S++){if(E[S].getAttribute("type")=="text/html"||E.length==1){I.htmlUrl=E[S].getAttribute("href")}}}else{I.htmlUrl=(E&&E[0]&&E[0].firstChild)?E[0].firstChild.nodeValue:""}var X=UWA.Utils.getChildrenByTagName(O,"title")[0];I.title=(X&&X.firstChild)?X.firstChild.nodeValue:I.htmlUrl;var U=(I.type==1)?F.getElementsByTagName("tagline"):F.getElementsByTagName("description");I.description=(U&&U.length>0)?((U[0].firstChild)?U[0].firstChild.nodeValue:""):"";if(typeof I.lang=="undefined"||!I.lang){var Y=F.getElementsByTagName("language");Y=(Y&&Y.length>0)?((Y[0].firstChild)?Y[0].firstChild.nodeValue:""):"";if(typeof Y!="undefined"&&Y.length>0){I.lang=Y}}if(typeof I.lang!="undefined"){if(/^(ar|he|fa|ur|ps|dv|yi|iw)\-?[a-z]{0,2}$/i.test(I.lang)){I.dir="rtl"}}I.items=[];var L=(I.type==1)?F.getElementsByTagName("entry"):F.getElementsByTagName("item");var H=L.length;for(var S=0;S<H;S++){var J={};obj_enclosures=[];var P=L[S].getElementsByTagName("enclosure");for(var R=0;R<P.length;R++){var K=P[R].getAttribute("type");if(/audio/.test(K)){}else{if(/video/.test(K)){}else{if(/image/.test(K)){}else{if(/x-shockwave-flash/.test(K)){}else{if(/x-flv/.test(K)){}else{continue}}}}}var B=P[R].getAttribute("url");if(K==""){if(strpos(B,".mp3")!==false){K="audio/mpeg"}}if(K==""){continue}obj_enclosures.push({type:K,url:B})}if(obj_enclosures.length>0){J.enclosures=obj_enclosures}var X=UWA.Utils.getChildrenByTagName(L[S],"title")[0];if(X&&X.firstChild){if(X.firstChild.nextSibling){J.title=X.firstChild.nextSibling.nodeValue}else{J.title=X.firstChild.nodeValue}}else{var V=L[S].getElementsByTagName("description");if(V[0]&&V[0].firstChild){var W=document.createElement("div");W.innerHTML=V[0].firstChild.nodeValue;J.title=((W.innerText)?W.innerText.substring(0,50).stripTags():"")+"..."}else{J.title="[...]"}}var G=(UWA.Client.Engine.ie)?L[S].getElementsByTagName("dc:date")[0]:L[S].getElementsByTagName("date")[0];if(L[S].getElementsByTagName("pubDate")[0]){J.date=(L[S].getElementsByTagName("pubDate")[0].firstChild)?L[S].getElementsByTagName("pubDate")[0].firstChild.nodeValue:""}else{if(G){J.date=G.firstChild.nodeValue}else{if(L[S].getElementsByTagName("issued")[0]){J.date=L[S].getElementsByTagName("issued")[0].firstChild.nodeValue}}}var T=(UWA.Client.Engine.ie)?L[S].getElementsByTagName("media:thumbnail")[0]:L[S].getElementsByTagName("thumbnail")[0];if(T){J.thumbnail=T.getAttribute("url")}var E=UWA.Utils.getChildrenByTagName(L[S],"link");if(E.length>0){if(I.type==1){for(var R=0;R<E.length;R++){if(E[R].getAttribute("type")=="text/html"||E.length==1){J.link=E[R].getAttribute("href")}}}else{if(E[0]||E[0].firstChild){J.link=(E[0].firstChild)?E[0].firstChild.nodeValue:""}}}else{if(I.type==0){if(L[S].getElementsByTagName("guid").length>0&&L[S].getElementsByTagName("guid")[0].firstChild){J.link=L[S].getElementsByTagName("guid")[0].firstChild.nodeValue}}}if(!J.link){J.link=I.htmlUrl}if(J.link!=""&&J.link!=I.htmlUrl){var N=J.link}else{var N=J.title+J.date+J.link}J.id_old=N.replace(/([^0-9a-zA-Z])/g,"");J.id=this.baseConvert(this.crc32(J.id_old),16,36);var A=L[S].getElementsByTagName("guid");if(A.length>0&&A[0].firstChild){var C=A[0].firstChild.nodeValue;J.id=C.replace(/([^0-9a-zA-Z])/g,"")}if(I.type==1){var Q=L[S].getElementsByTagName("content")[0];var U=L[S].getElementsByTagName("summary")[0]}else{var Q=(UWA.Client.Engine.ie)?L[S].getElementsByTagName("content:encoded")[0]:L[S].getElementsByTagName("encoded")[0];var U=L[S].getElementsByTagName("description")[0]}contentValue="";if(Q&&Q.hasChildNodes()){for(var M=Q.firstChild;M!=null;M=M.nextSibling){if(M.innerHTML){contentValue+=M.innerHTML}else{if(M.nodeValue){contentValue+=M.nodeValue}}}}else{if(U&&U.hasChildNodes()){for(var M=U.firstChild;M!=null;M=M.nextSibling){if(M.innerHTML){contentValue+=M.innerHTML}else{if(M.nodeValue){contentValue+=M.nodeValue}}}}}J.content=contentValue;I.items.push(J)}return I},getChildrenByTagName:function(D,B){var C=(D&&D.childNodes)?D.childNodes.length:0;var A=[];for(var E=0;E<C;E++){if(D.childNodes[E].nodeName==B){A.push(D.childNodes[E])}}return A}});

var Feed=function(B,A){return UWA.Utils.parseFeed(B)};
if(typeof Utils=="undefined"){Utils={}}
Utils.getChildrenByTagName=UWA.Utils.getChildrenByTagName;;

//69
if(typeof deconcept=="undefined"){var deconcept={}}
if(typeof deconcept.util=="undefined"){deconcept.util={}}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil={}}
deconcept.SWFObject=function(E,C,K,F,H,J,L,G,A,D){
	if(!document.getElementById){return }
	this.DETECT_KEY=D?D:"detectflash";
	this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params={};
	this.variables={};
	this.attributes=[];
	if(E){this.setAttribute("swf",E)}
	if(C){this.setAttribute("id",C)}
	if(K){this.setAttribute("width",K)}
	if(F){this.setAttribute("height",F)}
	if(H){this.setAttribute("version",new deconcept.PlayerVersion(H.toString().split(".")))}
	this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
	if(!window.opera&&document.all&&this.installedVer.major>7){
		if(!deconcept.unloadSet){
			deconcept.SWFObjectUtil.prepUnload=function(){
				__flash_unloadHandler=function(){};
				__flash_savedUnloadHandler=function(){};
				window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)
			};
			window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);
			deconcept.unloadSet=true
		}
	}
	if(J){this.addParam("bgcolor",J)}
	var B=L?L:"high";
	this.addParam("quality",B);
	this.setAttribute("useExpressInstall",false);
	this.setAttribute("doExpressInstall",false);
	var I=(G)?G:window.location;
	this.setAttribute("xiRedirectUrl",I);
	this.setAttribute("redirectUrl","");
	if(A){this.setAttribute("redirectUrl",A)}};
deconcept.SWFObject.prototype={
	useExpressInstall:function(A){this.xiSWFPath=!A?"expressinstall.swf":A;this.setAttribute("useExpressInstall",true)},
	setAttribute:function(A,B){this.attributes[A]=B},
	getAttribute:function(A){return this.attributes[A]||""},
	addParam:function(A,B){this.params[A]=B},
	getParams:function(){return this.params},
	addVariable:function(A,B){this.variables[A]=B},
	getVariable:function(A){return this.variables[A]||""},
	getVariables:function(){return this.variables},
	getVariablePairs:function(){var A=[];var B;var C=this.getVariables();for(B in C){A[A.length]=B+"="+C[B]}return A},
	getSWFHTML:function(){
		var D="";
		if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
			if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}
			D='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+(this.getAttribute("style")||"")+'"';
			D+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';
			var C=this.getParams();
			for(var A in C){D+=[A]+'="'+C[A]+'" '}
			var B=this.getVariablePairs().join("&");
			if(B.length>0){D+='flashvars="'+B+'"'}
			D+="/>"
		}else{
			if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}
			D='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+(this.getAttribute("style")||"")+'">';D+='<param name="movie" value="'+this.getAttribute("swf")+'" />';
			var C=this.getParams();
			for(var A in C){D+='<param name="'+A+'" value="'+C[A]+'" />'}
			var B=this.getVariablePairs().join("&");
			if(B.length>0){D+='<param name="flashvars" value="'+B+'" />'}
			D+="</object>"
		}
		return D
	},
	write:function(A){
		if(this.getAttribute("useExpressInstall")){var B=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(B)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var C=(typeof A=="string")?document.getElementById(A):A;C.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
	var C=new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins&&navigator.mimeTypes.length){
		var A=navigator.plugins["Shockwave Flash"];
		if(A&&A.description){
			C=new deconcept.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))
		}
	}else{
		if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){
			var D=1;var B=3;
			while(D){
				try{B++;D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+B);C=new deconcept.PlayerVersion([B,0,0])}catch(E){D=null}
			}
		}else{
			try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(E){
				try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");C=new deconcept.PlayerVersion([6,0,21]);D.AllowScriptAccess="always"}catch(E){if(C.major==6){return C}}try{D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(E){}
			}
			if(D!=null){C=new deconcept.PlayerVersion(D.GetVariable("$version").split(" ")[1].split(","))}
		}
	}
	return C
};
deconcept.PlayerVersion=function(A){
	this.major=A[0]!=null?parseInt(A[0]):0;this.minor=A[1]!=null?parseInt(A[1]):0;this.rev=A[2]!=null?parseInt(A[2]):0};

deconcept.PlayerVersion.prototype.versionIsValid=function(A){
	if(this.major<A.major){return false}if(this.major>A.major){return true}if(this.minor<A.minor){return false}if(this.minor>A.minor){return true}if(this.rev<A.rev){return false}return true};
deconcept.util={getRequestParameter:function(D){
	var C=document.location.search||document.location.hash;if(D==null){return C}if(C){var B=C.substring(1).split("&");for(var A=0;A<B.length;A++){if(B[A].substring(0,B[A].indexOf("="))==D){return B[A].substring((B[A].indexOf("=")+1))}}}return""}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){
	var C=document.getElementsByTagName("OBJECT");for(var B=C.length-1;B>=0;B--){C[B].style.display="none";for(var A in C[B]){if(typeof C[B][A]=="function"){C[B][A]=function(){}}}}};

if(!document.getElementById&&document.all){document.getElementById=function(A){return document.all[A]}}

var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;;

//70
if(typeof Netvibes=="undefined"||!Netvibes){var Netvibes={}}
if(typeof Netvibes.UI=="undefined"||!Netvibes.UI){
	Netvibes.UI={}}
Netvibes.UI.PrefsForm=function(A){this.module=A.module;this.displayButton=A.displayButton};
Netvibes.UI.PrefsForm.prototype={
	controls:{"default":function(A){var C=this.module.getValue(A.name);if(!C||C=="null"){C=""}var B=this.module.createElement("input");B.type="text";B.value=C;B.id="m_"+this.module.id+"_"+A.name;B.name=A.name;return B},"boolean":function(A){var B=this.module.createElement("input");B.type="checkbox";B.id="m_"+this.module.id+"_"+A.name;B.name=A.name;if(this.module.getBool(A.name)===true){B.setAttribute("checked","checked");B.defaultChecked=true}if(A.onchange){B.onclick=(function(D){var C=(D.target||D.srcElement);if(C.checked==true){this.module.setValue(A.name,"true")}else{this.module.setValue(A.name,"false")}this.module.callback(A.onchange)}).bindAsEventListener(this)}return B},password:function(A){var B='<input type="password" value="" id="m_'+this.module.id+'_pass" name="pass" /> ';return B},textarea:function(A){if(this.module.getValue(A.name)){var C=this.module.getValue(A.name)}else{var C=""}var B='<textarea id="m_'+this.module.id+"_"+name+'" name="'+A.name+'">'+C+"</textarea> ";return B},range:function(B){var A=this.module.createElement("select");A.id="m_"+this.module.id+"_"+B.name;A.name=B.name;if(parseInt(B.step)>0){for(var C=parseInt(B.min);C<=parseInt(B.max);C+=parseInt(B.step)){var D=this.module.createElement("option");if(this.module.getValue(B.name)==C){D.setAttribute("selected","selected")}D.value=C;D.setText(C);A.appendChild(D)}}if(B.onchange){A.onchange=(function(F){var E=(F.target||F.srcElement);this.module.setValue(B.name,E.value);this.module.callback(B.onchange)}).bindAsEventListener(this)}return A},list:function(B){var A=this.module.createElement("select");A.id="m_"+this.module.id+"_"+B.name;A.name=B.name;for(var C=0;C<B.options.length;C++){var D=this.module.createElement("option");if(this.module.getValue(B.name)==B.options[C].value){D.setAttribute("selected","selected")}D.value=B.options[C].value;D.setText((B.options[C].label?B.options[C].label:B.options[C].value));A.appendChild(D)}if(B.onchange){A.onchange=(function(F){var E=(F.target||F.srcElement);this.module.setValue(B.name,E.value);this.module.callback(B.onchange)}).bindAsEventListener(this)}return A},color:function(A){if(typeof A.colors=="undefined"){A.colors=["white","yellow","green","red","blue","orange"]}var B=this.module.createElement("div");B.addClassName("postItcolorSelection");for(i=0;i<A.colors.length;i++){var C=this.module.createElement("div");C.setStyle("background-color",A.colors[i]);C.onclick=(function(E){var D=(E.target||E.srcElement);this.module.setValue(A.name,D.style.backgroundColor);if(A.onchange){this.module.callback(A.onchange)}}).bindAsEventListener(this);B.appendChild(C)}return B}},getContent:function(){var F="";this.form=this.module.createElement("form");var K=this.module.createElement("table");K.addClassName("formTable");K.setStyle("width","100%");var E=this.module.createElement("tbody");for(var D=0;D<this.module.preferences.length;D++){var H=this.module.createElement("tr");var L=this.module.preferences[D];if(L.type=="hidden"){continue}if(!L.label){L.label=L.name}var J=this.module.createElement("label");J.setAttribute("for","m_"+this.module.id+"_"+L.name);J.setHTML(_(L.label+":"));var I=this.module.createElement("td");I.appendChild(J);H.appendChild(I);if(!this.controls[L.type]){L.type="default"}var C=this.controls[L.type].bind(this)(L);var A=this.module.createElement("td");A.setContent(C);H.appendChild(A);E.appendChild(H)}if(this.displayButton==undefined||this.displayButton===true){var G=this.module.createElement("input");G.type="submit";G.value=_("Ok");G.addClassName("buttonClean");var H=this.module.createElement("tr");var B=this.module.createElement("td");B.colSpan="2";B.appendChild(G);H.appendChild(B);E.appendChild(H)}K.appendChild(E);this.form.appendChild(K);this.form.onsubmit=(function(){var M=(function(){this.callback("endEdit")}).bind(this.module);this.saveValues();this.module.saveValues(M);return false}).bindAsEventListener(this);return this.form},saveValues:function(D){if(typeof D=="undefined"){var D=this.form}var B=UWA.Form.getElements(D);for(var A=0;A<B.length;A++){var C=B[A];if(C.type=="submit"){continue}switch(C.type){case"password":if(C.value!=""&&C.value!="XXNVXX"){this.module.setValue(C.name,C.value)}break;case"checkbox":if(C.checked){this.module.setValue(C.name,"true")}else{this.module.setValue(C.name,"false")}break;case"radio":if(C.checked){this.module.setValue(C.name,C.value)}break;default:this.module.setValue(C.name,C.value);break}}}};;

//71
if(typeof Netvibes=="undefined"||!Netvibes){var Netvibes={}}
if(typeof Netvibes.DLA=="undefined"||!Netvibes.DLA){
	Netvibes.DLA={}}
Netvibes.DLA.SearchForm=function(A){
	this.options={showCheckbox:false,allowEmpty:false,searchHistory:false};Object.extend(this.options,A||{});this._createForm()};
Netvibes.DLA.SearchForm.prototype={
	setFavicon:function(A,B){this.favicon.src=A;if(typeof (B)!="undefined"){this.favicon.alt=this.favicon.title=B}},setSearchText:function(A){this.inputSearch.value=A;this.resetButton.style.visibility=this.inputSearch.value.length?"visible":"hidden";this.inputSearch.onblur()},setInitialState:function(A,C,B){this.setFavicon(A);this.inputSearch.value=C;this.resetButton.style.visibility=this.inputSearch.value.length?"visible":"hidden";if(typeof B!="undefined"&&this.checkbox){this.checkbox.checked=B}this.inputSearch.onblur()},hide:function(){Element.hide(this.form)},show:function(){Element.show(this.form)},observe:function(B,A){if(!this.observers){this.observers=[]}this.observers.push([B,A])},_notify:function(B){if(!this.observers){return }var A=this.inputSearch.value;this.observers.each(function(C){if(C[0]==B&&typeof (C[1])=="function"){C[1](A.stripTags(),this.checkbox?this.checkbox.checked:null)}})},eventReset:function(){this._notify("reset");this.inputSearch.value="";this.resetButton.style.visibility="hidden";this.inputSearch.onblur();return false},eventSubmit:function(){var A=this.inputSearch.value;if(A==""&&!this.options.allowEmpty){return this.eventReset()}this._notify("submit");this._addHistory(A);this.resetButton.style.visibility="visible";return false},eventToggle:function(){this._notify("toggle")},eventFocus:function(){this.submitButton.disabled="";this._notify("focus")},eventBlur:function(){if(this.options.searchHistory){setTimeout(this._hideHistory.bindAsEventListener(this),1000)}this._notify("blur")},eventClick:function(){if(this.options.searchHistory){this._toggleHistory()}},eventKeyPress:function(){if(this.options.searchHistory){this._hideHistory()}},_createForm:function(){this.container=document.createElement("div");this.container.className="search";this.form=document.createElement("form");this.form.style.display="block";if(!Browser.isIE){this.form.style.position="relative"}this.form.onsubmit=this.eventSubmit.bindAsEventListener(this);this.favicon=document.createElement("img");this.favicon.className="favicon";if(typeof this.options.faviconUrl!="undefined"){this.favicon.src=this.options.faviconUrl}this.inputSearch=document.createElement("input");this.inputSearch.className="search";this.inputSearch.type="text";this.inputSearch.value="";this.inputSearch.style.paddingRight="18px";this.inputSearch.onfocus=this.eventFocus.bindAsEventListener(this);this.inputSearch.onblur=this.eventBlur.bindAsEventListener(this);if(this.options.searchHistory){this.inputSearch.onclick=this.eventClick.bindAsEventListener(this);this.inputSearch.onkeypress=this.eventKeyPress.bindAsEventListener(this)}this.resetButton=document.createElement("img");this.resetButton.title=this.resetButton.alt=_("Clear");this.resetButton.src="http://"+NV_HOST+"/img/clear.gif";this.resetButton.className="clear";this.resetButton.style.marginTop=(Browser.isIE)?"-6px":(Browser.isOpera)?"-2px":(Browser.isSafari)?"-4px":"-3px";this.resetButton.onclick=this.eventReset.bindAsEventListener(this);this.submitButton=document.createElement("input");UWA.$element(this.submitButton);this.submitButton.addClassName("submit");this.submitButton.type="submit";this.submitButton.value=_("Search");this.submitButton.style.marginLeft="5px";this.container.appendChild(this.form);this.form.appendChild(this.favicon);this.form.appendChild(this.inputSearch);this.form.appendChild(this.resetButton);this.form.appendChild(this.submitButton);if(this.options.showCheckbox){this.checkbox=document.createElement("input");this.checkbox.type="checkbox";this.checkbox.title=this.options.checkboxTitle;if(Browser.isIE){this.checkbox.style.marginLeft="5px"}else{this.checkbox.style.position="absolute";this.checkbox.style.top="5px";if((typeof App!="undefined"&&App.dirRTL)||(typeof widget!="undefined"&&widget.dir=="rtl")){this.checkbox.style.left="5px"}else{this.checkbox.style.right="5px"}}this.checkbox.value="";this.checkbox.onclick=this.eventToggle.bindAsEventListener(this);this.form.appendChild(this.checkbox)}},setHistoryString:function(E){if(this.options.searchHistory==false){return }if(typeof this.historyBox=="undefined"){this.historyBox=document.createElement("ul");this.historyBox.className="popupMenu";this.historyBox.style.textAlign="left";this.historyBox.style.display="none";this.historyBox.style.position="absolute";this.showSearchHistory=false;var D=this;if(typeof E!="undefined"&&E){this.showSearchHistory=true;E=E.split(":");for(var C=0;C<E.length;C++){var A=document.createElement("li");var B=document.createElement("a");B.onclick=function(){this.self.inputSearch.value=this.elem.innerHTML;this.self._hideHistory();this.self.eventSubmit();return false}.bind({self:this,elem:B});B.href="javascript:void(0)";B.innerHTML=E[C];A.setAttribute("query",E[C]);A.appendChild(B);this.historyBox.appendChild(A)}}var A=document.createElement("li");var B=document.createElement("a");B.style.borderBottom="";B.onclick=function(){this.self._clearHistory();return false}.bind({self:this,elem:B});B.href="javascript:void(0)";B.className="action";B.innerHTML=_("Clear recent searches");A.appendChild(B);this.historyBox.appendChild(A);document.getElementsByTagName("body").item(0).appendChild(this.historyBox)}},getHistoryString:function(){var B="";var C=this.historyBox.getElementsByTagName("li");for(var A=0;A<C.length-1;A++){if(A!=0){B+=":"}B+=C[A].getAttribute("query")}return B},_addHistory:function(D){if(this.options.searchHistory){if(this.historyBox.firstChild.getAttribute("query")==D){return }var C=this.historyBox.getElementsByTagName("li");if(C.length>10){this.historyBox.removeChild(C[C.length-2]);delete C[C.length-2]}var A=document.createElement("li");var B=document.createElement("a");B.onclick=function(){this.self.inputSearch.value=this.elem.innerHTML;this.self._hideHistory();this.self.eventSubmit();return false}.bind({self:this,elem:B});B.href="javascript:void(0)";B.innerHTML=D;A.setAttribute("query",D);A.appendChild(B);this.historyBox.insertBefore(A,this.historyBox.firstChild);this.showSearchHistory=true;this._notify("updateHistory")}},_clearHistory:function(A){if(this.options.searchHistory){this.historyBox.parentNode.removeChild(this.historyBox);delete this.historyBox;this.setHistoryString();this.showSearchHistory=false;this._notify("updateHistory");this.eventReset()}},_hideHistory:function(){this.historyBox.style.display="none"},_showHistory:function(){if(this.showSearchHistory!=true){return }var A=Element.getDimensions(this.inputSearch);var B=Element.getPosition(this.inputSearch);this.historyBox.style.width=A.width+"px";this.historyBox.style.left=B.x+"px";this.historyBox.style.top=B.y+A.height+"px";this.historyBox.style.display="block"},_toggleHistory:function(){if(this.historyBox.style.display=="none"){this._showHistory()}else{this._hideHistory()}},appendTo:function(A){A.appendChild(this.container)}};
if(typeof UWA=="undefined"){UWA={}}if(typeof UWA.Controls=="undefined"){UWA.Controls={}}UWA.Controls.SearchForm=Netvibes.DLA.SearchForm;;

//72
if(typeof Netvibes=="undefined"||!Netvibes){var Netvibes={}}
if(typeof Netvibes.UI=="undefined"||!Netvibes.UI){
	Netvibes.UI={}}
Netvibes.UI.Pager=function(A){
	this.module=A.module;this.limit=parseInt(A.limit);this.offset=parseInt(A.offset);this.callback=A.callback;this.dataArray=A.dataArray};
Netvibes.UI.Pager.prototype={
	getContent:function(){var B=document.createElement("div");B.className="nv-pager";if(this.offset>0){var D=document.createElement("a");D.className="prev";D.href="javascript:void(0)";D.innerHTML=_("prev");D.onclick=(function(){this.onChange(this.offset-this.limit);return false}).bind(this);B.appendChild(D)}if(this.offset<this.dataArray.length-this.limit){var C=document.createElement("a");C.className="next";C.href="javascript:void(0)";C.innerHTML=_("next");C.onclick=(function(){this.onChange(this.offset+this.limit);return false}).bind(this);B.appendChild(C)}var A=document.createElement("div");A.innerHTML='<p style="padding:0;margin:0;line-height:0;height:0;clear:both"></p>';B.appendChild(A);return B},getDom:function(){this.getContent()}};;

//73
Netvibes.UI.ToolTip=UWA.Class.create();
Netvibes.UI.ToolTip.prototype={
	initialize:function(B,C,A){this.tooltippedEle=$(B);this.root=null;this.options={module:null,width:200,offsetX:16,offsetY:16,"class":"tool-tip",dir:"ltr"};this.setOptions(A);this.widget=this.options.module;if(this.options.dir=="rtl"){this.options.offsetX=-this.options.offsetX}this.htmlText=C||"";this.isStandalone=(this.widget.environment.standalone)?true:false;this.isInline=(this.widget.environment.netvibes&&this.widget.environment.netvibes.inline)?true:false;if(this.widget){this.build()}},setOptions:function(A){UWA.extend(this.options,A||{})},build:function(){this.tooltip=$("nv-tooltip");if(!this.tooltip){this.tooltip=this.widget.createElement("div",{id:"nv-tooltip","class":this.options["class"],styles:{width:this.options.width,position:"absolute",display:"none"}}).inject(document.body)}if(this.htmlText.length>0){this.tooltippedEle.onmouseover=this.onShowTooltip.bindWithEvent(this);this.tooltippedEle.onmouseout=this.onHideTooltip.bindWithEvent(this);this.tooltippedEle.onmousemove=this._locate.bindWithEvent(this)}},onShowTooltip:function(A){if(!this.root){this.root=this._getRootNode(this.tooltippedEle)}this.tooltip.setHTML(this.htmlText);this.tooltip.show();this.tooltipSize=this.tooltip.getDimensions();this._locate(A)},onHideTooltip:function(A){this.tooltip.hide()},_getRootNode:function(B){if(this.isInline||this.isStandalone){return document.getElementsByTagName("body")[0]}var A=B;do{A=A.getParent()}while(!A.hasClassName("moduleContent"));return $(A)},_getViewport:function(){var A;if(typeof window.innerWidth!="undefined"){A={width:window.innerWidth+window.pageXOffset,height:window.innerHeight+window.pageYOffset}}else{A={width:document.documentElement.clientWidth+document.body.scrollLeft,height:document.documentElement.clientHeight+document.body.scrollTop}}return A},_locate:function(E){var C={};var G=0;var F=0;var D=(!this.isInline)?Element.getDimensions(this.root):this._getViewport();if(this.isInline||this.isStandalone){C={x:Event.pointerX(E),y:Event.pointerY(E)}}else{var A=this._getRelativeCoordinates(E,this.root);C={x:A.x,y:A.y}}var B={};B.x=C.x;B.y=C.y;if(this.tooltipSize){if(this.options.dir=="rtl"){B.x-=this.tooltipSize.width}B.x=B.x+this.options.offsetX;B.y=B.y+this.options.offsetY;if(B.x+this.tooltipSize.width>D.width){G=B.x+this.tooltipSize.width-D.width}if(B.x<0){G=B.x}if(B.y+this.tooltipSize.height>D.height){F+=this.tooltipSize.height+this.options.offsetY+(this.options.offsetY/2)}}B.x=B.x-G;B.y=B.y-F;this.tooltip.setStyles({top:B.y+"px",left:B.x+"px"})},_getRelativeCoordinates:function(D,B){var A,H;D=D||window.event;var C=D.target||D.srcElement;if(!window.opera&&typeof D.offsetX!="undefined"){var G={x:D.offsetX,y:D.offsetY};var E=C;while(E){E.mouseX=G.x;E.mouseY=G.y;G.x+=E.offsetLeft;G.y+=E.offsetTop;E=E.offsetParent}var E=B;var F={x:0,y:0};while(E){if(typeof E.mouseX!="undefined"){A=E.mouseX-F.x;H=E.mouseY-F.y;break}F.x+=E.offsetLeft;F.y+=E.offsetTop;E=E.offsetParent}E=C;while(E){E.mouseX=undefined;E.mouseY=undefined;E=E.offsetParent}}else{var G=this._getAbsolutePosition(B);A=D.pageX-G.x;H=D.pageY-G.y}return{x:A,y:H}},_getAbsolutePosition:function(B){var C={x:B.offsetLeft,y:B.offsetTop};if(B.offsetParent){var A=this._getAbsolutePosition(B.offsetParent);C.x+=A.x;C.y+=A.y}return C}};;

//74
if(typeof Netvibes=="undefined"||!Netvibes){var Netvibes={}}
if(typeof Netvibes.UI=="undefined"||!Netvibes.UI){Netvibes.UI={}}
Netvibes.UI.FeedView=Class.create();
Netvibes.UI.FeedView.prototype={
	setOptions:function(A){this.options={details:false,openOutside:true,showDate:true,feedSiteUrlDomain:"",lookForHtmlThumbnail:false,removeImagePattern:false,allowVideoPlayButton:false,showStarring:false,search:"",dir:"ltr"};Object.extend(this.options,A||{})},
	initialize:function(A){this._elements=[];this.setOptions(A);this._createList()},
	setSearch:function(A){this.options.search=A},
	resetSearch:function(){this.options.search=""},
	addItem:function(H,Y,R){
		var V=false;
		var e,F,K,G;
		var L=document.createElement("li");
		var b=document.createElement("a");
		var B=this._truncate(Y.content.replace(/<\/?[^>]+>/gi," "),100);
		if(this.options.search!==""){B=String.highlight(B,this.options.search)}
		b.href=Y.link;
		b.target="_blank";
		var Q=Y.title.stripTags();
		if(this.options.search!==""){Q=String.highlight(Q,this.options.search)}
		b.innerHTML=Q;
		var S=this._getDiffDate(Y.date);
		if(S){var I=document.createElement("small");I.index=H;I.style.color="#AAA";I.innerHTML=" - "+S;b.appendChild(I)}
		if(this.options.details===false){b.desc=B;b.onmouseover=function(){if(typeof UWA!="undefined"){UWA.Utils.setTooltip(this,this.desc,250)}}}
		b.index=H;
		b.onmouseup=this._onItemMouseDown.bindAsEventListener(this);
		b.onclick=this._onItemClicked.bindAsEventListener(this);
		if(this.options.allowVideoPlayButton&&Y.video){V=true}
		if(typeof Y.enclosures=="object"){
			Y.enclosures.each(function(a){if(a.url!==""){if(/^image\/(jpeg|gif|jpg|bmp|png)$/.test(a.type)){e=a.url}else{F=true;K=a.url}if(/^audio\/mpeg$/.test(a.type)||/\.mp3$/.test(a.url)){G=true}}})
		}
		if(this.options.lookForHtmlThumbnail){
			var c=Y.content;c=c.replace(/src="http:\/\/[^"]+\/(~[rfa]|ads)\/[^"]+/mg,"");
			var C=/<img.*?src=('|")?\s*(.*?)\s*('|"|\s*?\/?>|>)/i.exec(c);
			if(C){e=C[2].unescapeHTML()}
		}
		if(this.options.removeImagePattern&&typeof e!="undefined"){
			if(e.match(new RegExp(this.options.removeImagePattern))){e=""}
		}
		if(typeof F!="undefined"&&V===false){
			b.style[this.options.dir=="rtl"?"marginLeft":"marginRight"]="20px";var T=document.createElement("img");T.title=_("Play");T.style.border="0px";T.style.cssFloat=this.options.dir=="rtl"?"left":"right";T.style.styleFloat=this.options.dir=="rtl"?"left":"right";if(typeof App!="undefined"&&typeof G!="undefined"){T.style.cursor="pointer";T.fileLink=K;T.podName=Q;T.index=H;T.src="http://"+NV_HOST+"/img/speaker.gif";T.onclick=this._onPodcastPlay.bindAsEventListener(this)}else{T.src="http://"+NV_HOST+"/img/speaker-disabled.png"}var E=document.createElement("a");E.href=K;var O=document.createElement("img");O.title=_("Download");O.src="http://"+NV_HOST+"/img/ipod.png";O.style[this.options.dir=="rtl"?"marginRight":"marginLeft"]="2px";O.style.border="0px";E.style.border="0px";E.style.cursor="pointer";E.mediaUrl=K;E.index=H;E.onclick=this._onDownload.bindAsEventListener(this);E.style.cssFloat=this.options.dir=="rtl"?"left":"right";E.style.styleFloat=this.options.dir=="rtl"?"left":"right";E.appendChild(O);if(this.options.dir=="rtl"){L.appendChild(T);L.appendChild(E)}else{L.appendChild(E);L.appendChild(T)}
		}
		if(this.options.showStarring===true){var Z=document.createElement("img");Z.title=_("Share as favorite");Z.style.border="0px";Z.style.cursor="pointer";Z.index=H;Z.src="/img/icons/favourites_small.gif";Z.style.cssFloat=this.options.dir=="rtl"?"left":"right";Z.style.styleFloat=this.options.dir=="rtl"?"left":"right";Z.style[this.options.dir=="rtl"?"marginLeft":"marginRight"]="2px";Z.style.visibility="hidden";L.onmouseover=function(){Z.style.visibility="visible"};L.onmouseout=function(){Z.style.visibility="hidden"};Z.onclick=this._onAddStar.bindAsEventListener(this);L.appendChild(Z)}
		if(this.options.details===false){
			L.appendChild(b)
		}else{
			var A="0px";var W=document.createElement("h3");
			var P=document.createElement("p");
			if(Y.thumbnail){e=Y.thumbnail}
			if(typeof e!="undefined"&&e!==""){
				e=e.trim();if(e.substring(0,4)!=="http"&&this.options.feedSiteUrlDomain!==""){var D=e.substring(0,1)=="/"?"":"/";e=this.options.feedSiteUrlDomain+D+e}var J=document.createElement("a");J.style.border="0px";J.href=Y.link;J.target="_blank";J.index=H;J.style.outline="none";J.onmouseup=this._onItemMouseDown.bindAsEventListener(this);J.onclick=this._onItemClicked.bindAsEventListener(this);var d=document.createElement("img");d.index=H;d.className="thumb";d.src=e;var N=document.createElement("div");N.appendChild(J);N.className="feedThumbnail";L.appendChild(N);if(V===true){var M=document.createElement("div");M.style.width="80px";M.style.textAlign="center";M.style.cssFloat=M.style.styleFloat="left";var X=document.createElement("img");X.src="http://"+NV_HOST+"/img/play.png";X.index=H;X.onclick=this._onVideoPlay.bindAsEventListener(this);X.style.marginLeft="-80px";X.style.cssFloat=X.style.styleFloat="left";X.style.width="80px";X.style.height="60px";if(UWA.Client.Engine.ie&&UWA.Client.Engine.version==6){X.src="http://"+NV_HOST+"/img/s.gif";X.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',src='http://"+NV_HOST+"/img/play.png');"}M.appendChild(d);J.appendChild(M);J.appendChild(X)}else{J.appendChild(d)}A="88px"}
			P.className="description";
			P.style[this.options.dir=="rtl"?"marginRight":"marginLeft"]=A;
			P.style[this.options.dir=="rtl"?"marginLeft":"marginRight"]="0px";
			P.innerHTML=B;
			W.style[this.options.dir=="rtl"?"marginRight":"marginLeft"]=A;
			W.style[this.options.dir=="rtl"?"marginLeft":"marginRight"]="0px";
			W.appendChild(b);
			L.appendChild(W);
			var U=H%2?"even":"odd";
			L.className="item "+U;L.appendChild(P)
		}
		if(R===true){L.className+=" read"}else{L.className+=" unread"}
		this._elements[H]=L;
		if(!(this.options.search!==""&&this._searchInString(this.options.search,Y.title)===false&&this._searchInString(this.options.search,Y.content)===false)){this._feedList.appendChild(L);this._numberDisplayedItems++}
	},
	getContent:function(){return this._feedList},
	getItem:function(A){return this._elements[A]},
	getNumberOfDisplayedItems:function(){return this._numberDisplayedItems},
	setRead:function(A){var B=this._elements[A];Element.addClassName(B,"read");Element.removeClassName(B,"unread")},
	setUnRead:function(A){var B=this._elements[A];Element.addClassName(B,"unread");Element.removeClassName(B,"read")},
	observe:function(B,A,C){if(B=="onaddstar"){this.options.showStarring=true}if(!this.observers){this.observers=[]}this.observers.push([B,A,C])},
	_notify:function(B,C){if(!this.observers){return false}var A=false;this.observers.each(function(D){if(D[0]==B&&typeof (D[1])=="function"){if(typeof D[2]=="undefined"){A=D[1](C)}else{A=D[1].call(D[2],C)}}});return A},
	_createList:function(){this._numberDisplayedItems=0;this._feedList=document.createElement("ul");if(this.options.details==true){this._feedList.className="nv-thumbnailedList";this._feedList.style.listStyleType="none"}else{this._feedList.className="nv-feedList"}if(this.options.dir=="rtl"){Element.addClassName(this._feedList,"rtl")}},
	_searchInString:function(A,B){var C=B.toLowerCase().indexOf(A.toLowerCase());if(C!=-1){return true}return false},
	_onItemMouseDown:function(B){if(typeof B=="undefined"){B=event}var A=(B.target||B.srcElement);if((typeof B.which=="undefined"&&B.button==2)||(B.which==3&&B.button==2)||((B.ctrlKey==true||B.metaKey==true)&&B.which==1&&B.button==0)){this._notify("onrightclick",{index:A.index});B.returnValue=true;return true}if((typeof B.which=="undefined"&&B.button==4)||(B.which==2&&B.button==1)||(B.which==2&&B.button==4)||(B.which==2&&B.button==2)||(B.which==3&&B.button==3)||(B.ctrlKey==true&&!UWA.Client.Platform.mac)||B.shiftKey==true){this._notify("onmiddleclick",{index:A.index});B.returnValue=true;return true}if(B.preventDefault){B.preventDefault()}else{B.returnValue=false}return false},
	_onItemClicked:function(B){if(typeof B=="undefined"&&typeof event!="undefined"){B=event}var A=(B.target||B.srcElement);if(typeof B!="undefined"&&(((B.ctrlKey==true&&!UWA.Client.Platform.mac)||B.shiftKey==true)||(B.metaKey==true&&B.which==1&&B.button==0&&UWA.Client.Platform.mac))){return true}return !this._notify("onclick",{index:A.index})},
	_onPodcastPlay:function(B){if(typeof B=="undefined"){B=event}var A=(B.target||B.srcElement);this._notify("onpodcastplay",{index:A.index,fileLink:A.fileLink,podName:A.podName})},
	_onVideoPlay:function(B){if(typeof B=="undefined"){B=event}var A=(B.target||B.srcElement);this._notify("onvideoplay",{index:A.index})},
	_onDownload:function(B){if(typeof B=="undefined"){B=event}var A=(B.target||B.srcElement);this._notify("ondownload",{index:A.index,mediaUrl:A.mediaUrl})},
	_onAddStar:function(B){if(typeof B=="undefined"){B=event}var A=(B.target||B.srcElement);this._notify("onaddstar",{index:A.index})},
	_getDiffDate:function(B){if(typeof B=="undefined"||!this.options.showDate){return""}var A=Date.parse(B);if(isNaN(A)){if(typeof Date.setISO8601=="undefined"){Date.prototype.setISO8601=function(G){var H="([0-9]{4})(-([0-9]{2})(-([0-9]{2})(T([0-9]{2}):([0-9]{2})(:([0-9]{2})(.([0-9]+))?)?(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?";var J=G.match(new RegExp(H));var I=0;var F=new Date(J[1],0,1);if(J[3]){F.setMonth(J[3]-1)}if(J[5]){F.setDate(J[5])}if(J[7]){F.setHours(J[7])}if(J[8]){F.setMinutes(J[8])}if(J[10]){F.setSeconds(J[10])}if(J[12]){F.setMilliseconds(Number("0."+J[12])*1000)}if(J[14]){I=(Number(J[16])*60)+Number(J[17]);I*=((J[15]=="-")?1:-1)}I-=F.getTimezoneOffset();C=(Number(F)+(I*60*1000));this.setTime(Number(C))}}A=new Date();A.setISO8601(B);if(!A){return""}}var D=new Date().getTime()-A;if(D<=0){return""}D/=1000;var C={};C.sec=Math.floor(D);C.min=Math.floor(D/60);C.hour=Math.floor(D/3600);C.day=Math.floor(D/86400);C.week=Math.floor(C.day/7);C.month=Math.floor(C.day/30);C.year=Math.floor(C.day/365);var E;if(C.year==1){E=_("{0} year ago").format(C.year)}else{if(C.year>1){E=_("{0} years ago").format(C.year)}else{if(C.month==1){E=_("{0} month ago").format(C.month)}else{if(C.month>1){E=_("{0} months ago").format(C.month)}else{if(C.week==1){E=_("{0} week ago").format(C.week)}else{if(C.week>1){E=_("{0} weeks ago").format(C.week)}else{if(C.day==1){E=_("yesterday")}else{if(C.day>1){E=_("{0} days ago").format(C.day)}else{if(C.hour==1){E=_("{0} hour ago").format(C.hour)}else{if(C.hour>1){E=_("{0} hours ago").format(C.hour)}else{if(C.min==1){E=_("{0} minute ago").format(C.min)}else{if(C.min>1){E=_("{0} minutes ago").format(C.min)}else{if(C.sec==1){E=_("{0} second ago").format(C.sec)}else{if(C.sec>1){E=_("{0} seconds ago").format(C.sec)}}}}}}}}}}}}}}return E},
	_truncate:function(C,B){if(!B){B=30}if(C.length<=B){return C}var D=".,;!? ";p=-1;for(var A=0;A<B;A++){if(D.indexOf(C.charAt(A))!=-1){p=A}}if(p==-1){p=B-1}return""+C.substr(0,p)+"..."}
};;

//75
if(typeof Netvibes=="undefined"||!Netvibes){var Netvibes={}}
if(typeof Netvibes.UI=="undefined"||!Netvibes.UI){Netvibes.UI={}}
Netvibes.UI.Feed=Class.create();
Netvibes.UI.Feed.prototype={
	setOptions:function(A){UWA.log("Feed.setOptions()");this.options={details:false,openOutside:false,showDate:true,lookForHtmlThumbnail:false,allowVideoPlayButton:false,updateIcon:true,updateTitle:true,search:"",dir:"ltr",nbTitles:7};Object.extend(this.options,A||{})},initialize:function(B,A){UWA.log("Feed.initialize()");this.widget=B;this.setOptions(A)},display:function(B,A){UWA.log("Feed.display()");delete this.feed;this.url=B;this.content=A;this._displayContent()},setVideoContainer:function(A){UWA.log("Feed.setVideoContainer()");this.videoContainer=A},_displayContent:function(){UWA.log("Feed._displayContent()");var C=this.content;C.innerHTML="";this.feedDiv=document.createElement("div");if(this.options.searchUrl){this.searchDiv=document.createElement("div");C.appendChild(this.searchDiv);var D=decodeURIComponent(this.widget.getValue("lastSearch"));if(D=="__undefined__"){if(this.options.searchValue){D=decodeURIComponent(this.options.searchValue)}else{D=""}}this.searchForm=new UWA.Controls.SearchForm();this.searchForm.setInitialState("/img/s.gif",D,false);this.searchForm.observe("submit",function(G,F){this._doSearch(this.options.searchUrl,G,this.options.proxy)}.bind(this));this.searchForm.observe("reset",function(G,F){this._doSearch(this.options.searchUrl,"",this.options.proxy)}.bind(this));this.searchForm.appendTo(this.searchDiv);this.highlight=D;this._doSearch(this.options.searchUrl,D,this.options.proxy)}if(this.options.hasVideoPlayer==true){this.playerDiv=this.videoContainer;var E=Element.getDimensions(this.playerDiv);var B=this.options.videoAspectRatio||1;var A={width:E.width,height:E.width/B,wmode:this.options.flashNotOpaque?"":"opaque",autoResize:true,showFullScreenLink:false};if(this._isInNativeMode()){this.widget.environment.obj.dataObj.fixId=Math.random()*100000;A.fixModuleId=this.widget.environment.obj.dataObj.fixId}this.flashPlayer=new UWA.Controls.FlashPlayer(this.playerDiv,A)}if(this.options.hasAudioPlayer==true&&AudioPlayer&&AudioPlayer.init){this.audioPlayerDiv=document.createElement("div");this.audioPlayerDiv.id="playermp3Container";this.content.appendChild(this.audioPlayerDiv);AudioPlayer.init()}C.appendChild(this.feedDiv);if(this.url){if(typeof this.feed=="undefined"){this._getFeed(this.url,this.options.proxy)}else{this._displayFeed()}}},_displayFeed:function(K){if(this.lastRequest&&this.lastRequest.cancel){this.lastRequest.cancel()}if(typeof K!="undefined"){this.feed=K;if(typeof K.dir!="undefined"&&K.dir=="rtl"){this.widget.dir="rtl";this.content.dir="rtl";if(typeof this.content.parentNode!="undefined"){Element.addClassName(this.content.parentNode,"rtl")}}else{this.widget.dir="ltr";this.content.dir="ltr"}}else{K=this.feed}if(this.options.updateIcon){this.widget.setIcon(K.htmlUrl)}var I=K.title;var A=this.widget.getValue("category");if(this.widget.readOnly==true&&typeof this.options.category!="undefined"){A=this.options.category}if(this.options.useCategoriesAsTitle==true){I=this.options.categoryLabels[A]}if(this.options.updateTitle){this.widget.setTitle('<a href="'+K.htmlUrl+'" target="_blank">'+I+"</a>")}if(!K||K.error){this._error(_("Error"),_("Looks like this feed is not valid or currently not responding."));return }else{if(K.status==401){this._error(_("Unauthorized"),_("You don't have the required authorization to access this feed."));return }else{if(!K.items){this._error(_("Error"),_("Looks like this feed is not valid or currently not responding."));return }else{if(K.items.length==0){this._error(K.title,_("No items in feed."));return }}}}var H=this.feedDiv;var G=typeof K.htmlUrl=="undefined"?"":K.htmlUrl;if(G){var D=G.substring(0,G.indexOf("/",7));if(D){G=D}}this.history=this.widget.getHistory();UWA.Services.FeedHistory.build(this.widget.readOnly?"":this.history,K);this.feedView=new UWA.Controls.FeedView({details:this.options.details,showDate:this.options.showDate,lookForHtmlThumbnail:this.options.lookForHtmlThumbnail,removeImagePattern:this.options.removeImagePattern,feedSiteUrlDomain:G,search:this.options.search,dir:this.widget.dir,allowVideoPlayButton:this.options.hasVideoPlayer});this.feedView.observe("onclick",this._onClick.bind(this));this.feedView.observe("onmiddleclick",this._onMiddleClick.bind(this));this.feedView.observe("onpodcastplay",this._onPodcastPlay.bind(this));this.feedView.observe("onvideoplay",this._onVideoPlay.bind(this));this.feedView.observe("ondownload",this._onDownload.bind(this));if(this._isInNativeMode()&&this.widget.readOnly!=true){this.feedView.observe("onaddstar",this._onAddStar.bind(this))}if(typeof this.offset=="undefined"){this.offset=0}if(this.options.search!=""){C=K.items.length}else{this.limit=this.options.nbTitles;var C=K.items.length-this.offset;C=C>this.limit?this.limit:C}for(var E=0;E<C;E++){var F=this.offset+E;var N=K.items[F];if(typeof N.enclosures=="object"&&typeof N.video=="undefined"){N.enclosures.each(function(O){if(O.type=="application/x-shockwave-flash"){N.video=O.url}})}if(N.video&&this.options.hasVideoPlayer==true&&this.options.videoAutoPlay==true&&this.widget.getBool("videoAutoPlay")){this.flashPlayer.show(N.video,N.flashvars+this.options.sharingLink,{mediaLinkUrl:N.link,mediaLinkText:_("See on {0}").format(this.options.config.providerName)});if(typeof this.options.headerTextColor!="undefined"){var M=this.playerDiv.getElementsByTagName("a");for(var J=0;J<M.length;J++){M[J].style.color=this.options.headerTextColor}}this.options.videoAutoPlay=false}this.feedView.addItem(F,N,UWA.Services.FeedHistory.isRead(K,F))}H.innerHTML="";H.appendChild(this.feedView.getContent());if(this.options.hideUnreadCount!=true&&this.widget.readOnly!=true){var L=UWA.Services.FeedHistory.getNbNew(K,K.items.length);this.widget.setUnreadCount(L)}if(this.options.search!=""){this.widget.setSearchResultCount(this.feedView.getNumberOfDisplayedItems())}else{var B=new UWA.Controls.Pager({module:this,limit:this.limit,offset:this.offset,dataArray:K.items});B.onChange=function(O){this.module.offset=O;this.module._displayFeed()};this.pagerContent=B.getContent();H.appendChild(this.pagerContent);if(!this._isInNativeMode()||App.userCustom.showFeedNav=="1"){this.pagerContent.style.display="block"}this.pagerContent.style.display="block"}this.widget.callback("onUpdateBody")},_getFeed:function(A,B){UWA.log("Feed._getFeed()");if(typeof A=="undefined"){A=this.url}if(typeof A=="undefined"){return }if(typeof B=="undefined"){B=this.options.proxy||"feed"}if(this.lastRequest&&this.lastRequest.cancel){this.lastRequest.cancel()}this.url=A;if(!B){B=this.options.proxy||"feed"}this.feedDiv.innerHTML=_("Loading...");var C={method:"GET",proxy:B,shortFeed:false,type:"feed",onComplete:this._displayFeed.bind(this),onFailure:this._displayFeed.bind(this)};if(B=="ajax"&&!this._isInNativeMode()){A="http://"+NV_HOST+A}this.lastRequest=UWA.Data.request(A,C)},_doSearch:function(A,C,B){C=encodeURIComponent(C);this.widget.setValue("lastSearch",C);if(C==""){this._error(this.options.title,_("No search entry yet"))}else{this.widget.setHistory("");this._getFeed(A.replace(/%s/,C),B)}},_onClick:function(E){this._setRead(E.index);if(this.options.openOutside==true){return false}if(this.options.forcePlayVideo==true){return this._onVideoPlay(E)}if(App.inSubscribePreview){return false}var B=this.feed;if(typeof App.FeedReader!="undefined"){if(this.flashPlayer&&typeof this.flashPlayer!="undefined"){this.flashPlayer.hide();this.widget.callback("onUpdateBody")}var D=new Netvibes.UI.Feed.FeedReaderCom(this);var C=B.title;var A=this.widget.getValue("category");if(this.widget.readOnly==true&&typeof this.options.category!="undefined"){A=this.options.category}if(this.options.useCategoriesAsTitle==true){C=this.options.categoryLabels[A]}App.FeedReader.display({title:C,moduleLocalData:D,selectedItemIndex:E.index,moduleObj:D,contentObj:D,proxy:"proxy/feedProxy.php?url="+encodeURIComponent(this.url)})}else{if(typeof Netvibes.UI.EmbedFeedReader!="undefined"){new Netvibes.UI.EmbedFeedReader(B,E.index)}else{if(this.widget&&this.widget.openURL){this.widget.openURL(B.items[E.index].link)}}}return true},_onVideoPlay:function(D){this._setRead(D.index);var C=this.feed;if(C.items[D.index].video&&this.options.hasVideoPlayer==true){this.flashPlayer.show(C.items[D.index].video,C.items[D.index].flashvars+this.options.sharingLink,{mediaLinkUrl:C.items[D.index].link,mediaLinkText:_("See on {0}").format(this.options.providerName)});if(typeof this.options.headerTextColor!="undefined"){var B=this.playerDiv.getElementsByTagName("a");for(var A=0;A<B.length;A++){B[A].style.color=this.options.headerTextColor}}this.widget.callback("onUpdateBody")}return true},_onMiddleClick:function(A){this._setRead(A.index);if(this.flashPlayer){this.flashPlayer.hide();this.widget.callback("onUpdateBody")}},_onPodcastPlay:function(A){if(this._isInNativeMode()){if(App.inSubscribePreview){alert(_("Sorry, this feature is not available in preview mode."));return false}this._setRead(A.index);if(AudioPlayer&&AudioPlayer.play){AudioPlayer.play(A.fileLink,A.podName)}return false}else{this._setRead(A.index);if(AudioPlayer&&AudioPlayer.play){AudioPlayer.play(A.fileLink,A.podName)}return true}},_setRead:function(A){UWA.log("Feed._setRead()");var C=this.feed;if(UWA.Services.FeedHistory.isRead(C,A)==false){UWA.Services.FeedHistory.setRead(C,A);this.feedView.setRead(A);this.widget.setHistory(UWA.Services.FeedHistory.getString(C));if(this.options.hideUnreadCount!=true&&this.widget.readOnly!=true){var B=UWA.Services.FeedHistory.getNbNew(C,C.items.length);this.widget.setUnreadCount(B)}}},_onDownload:function(A){this._setRead(A.index);this.widget.openURL(A.mediaUrl);return true},_onAddStar:function(C){var B=this.feed;var A=B.items[C.index];this.widget.addStar({title:A.title,url:A.link});return true},_error:function(B,A){this.feedDiv.innerHTML="<p>"+A+"</p>";return false},_isInNativeMode:function(){return(typeof this.widget.environment.netvibes!="undefined"&&this.widget.environment.netvibes.inline)}};
	
Netvibes.UI.Feed.FeedReaderCom=Class.create();
Netvibes.UI.Feed.FeedReaderCom.prototype={
	initialize:function(A){this.feedCtrl=A;this.feed=this.feedCtrl.feed},save:function(){UWA.log("FeedReaderCom.save()")},setHistory:function(A){UWA.log("FeedReaderCom.setHistory();");this.feedCtrl.widget.setHistory(A)},saveHistory:function(){UWA.log("FeedReaderCom.saveHistory()");this.feedCtrl.widget.saveHistory()},getItemNode:function(A){UWA.log("FeedReaderCom.getItemNode()");return this.feedCtrl.feedView.getItem(A)},setFeedTitle:function(){UWA.log("FeedReaderCom.setFeedTitle()");if(this.feedCtrl.options.hideUnreadCount!=true&&this.feedCtrl.widget.readOnly!=true){var B=this.feedCtrl.feed;var A=UWA.Services.FeedHistory.getNbNew(B,B.items.length);this.feedCtrl.widget.setUnreadCount(A)}},setAllAsRead:function(){UWA.log("FeedReaderCom.setAllAsRead()");if(this.feedCtrl.widget.readOnly==true){return }var D=this.feedCtrl.feed;var B=D.items.length;var A=this.feedCtrl.feedView.getNumberOfDisplayedItems();for(var C=0;C<B;C++){if(C>=this.feedCtrl.offset&&C<(A+this.feedCtrl.offset)){if(UWA.Services.FeedHistory.isRead(D,C)){this.feedCtrl.feedView.setRead(C)}else{this.feedCtrl.feedView.setUnRead(C)}}}this.setFeedTitle()},getShowPage:function(){UWA.log("FeedReaderCom.getShowPage()");return parseInt(this.feedCtrl.widget.getValue("showPage"))},setShowPage:function(A){UWA.log("FeedReaderCom.setShowPage()");return parseInt(this.feedCtrl.widget.setValue("showPage",A))},addStar:function(A){UWA.log("FeedReaderCom.addStar()");this.feedCtrl.widget.addStar(A)}};;

//76
if(typeof UWA=="undefined"){var UWA={}}
if(typeof UWA.Services=="undefined"){UWA.Services={}}
if(typeof UWA.Services.Mail=="undefined"){UWA.Services.Mail={}}
if(typeof UWA.mailproxies=="undefined"){
	UWA.mailproxies={pop:NV_PATH+"proxy/securePopProxy.php",gmail:NV_PATH+"proxy/securePassProxy.php",hotmail:NV_PATH+"modules/hotmail/hotmail.php"}}
UWA.Services.Mail.getFromProvider=function(B,A){
	switch(B){case"pop":case"gmail":case"hotmail":return UWA.Data.request(UWA.mailproxies[B],{method:"POST",type:"json",parameters:A.parameters,onComplete:A.onComplete});default:UWA.log("invalid request type");break}};;

//77
if(typeof UWA=="undefined"){var UWA={}}
if(typeof UWA.Services=="undefined"){UWA.Services={}}
if(typeof UWA.Services.Search=="undefined"){UWA.Services.Search={}}
UWA.Services.Search.getFromProvider=function(D,C){
	var B="";if(typeof C.lang!="undefined"){B+="&lang="+C.lang}if(typeof C.locale!="undefined"){B+="&locale="+C.locale}if(typeof C.mode!="undefined"){B+="&mode="+C.mode}switch(C.type){case"websearch":var A="http://"+NV_HOST+"/data/websearch/?q="+encodeURIComponent(C.query)+"&engine="+encodeURIComponent(D)+B;return UWA.Data.request(A,{method:"GET",type:"json",onComplete:C.onComplete,context:C.context});case"blogsearch":var A="http://"+NV_HOST+"/data/blogsearch/?q="+encodeURIComponent(C.query)+"&engine="+encodeURIComponent(D)+B;return UWA.Data.request(A,{method:"GET",type:"json",onComplete:C.onComplete,context:C.context});case"imagesearch":var A="http://"+NV_HOST+"/data/imagesearch/?q="+encodeURIComponent(C.query)+"&engine="+encodeURIComponent(D)+B;return UWA.Data.request(A,{method:"GET",type:"json",onComplete:C.onComplete,context:C.context});case"videosearch":var A="http://"+NV_HOST+"/data/videosearch/?q="+encodeURIComponent(C.query)+"&engine="+encodeURIComponent(D)+B;return UWA.Data.request(A,{method:"GET",type:"json",onComplete:C.onComplete,context:C.context});case"podcastsearch":var A="http://"+NV_HOST+"/data/podcastsearch/?q="+encodeURIComponent(C.query)+"&engine="+encodeURIComponent(D)+B;return UWA.Data.request(A,{method:"GET",type:"json",onComplete:C.onComplete,context:C.context});case"shoppingsearch":var A="http://"+NV_HOST+"/data/shoppingsearch/?q="+encodeURIComponent(C.query)+"&engine="+encodeURIComponent(D)+B;return UWA.Data.request(A,{method:"GET",type:"json",onComplete:C.onComplete,context:C.context});case"opensearch":var A="http://"+NV_HOST+"/data/opensearch/?q="+encodeURIComponent(C.query)+"&url="+encodeURIComponent(C.url)+B;return UWA.Data.request(A,{method:"GET",type:"json",onComplete:C.onComplete,context:C.context});default:UWA.log("invalid request type");break}};
UWA.Data.getFromProvider=UWA.Services.Search.getFromProvider;;

//78
if(typeof UWA=="undefined"){UWA={}}
if(typeof UWA.Services=="undefined"){UWA.Services={}}
UWA.Services.FeedHistory={};
UWA.Services.FeedHistory.build=function(E,B){
	if(B.history){if(B.history.lastPostId){UWA.Services.FeedHistory.upgrade(B)}}else{B.history={};if(E&&E!=""){var A=E.split(":");if(A[A.length-1]==1||A[A.length-1]==0){B.history.lastPostId=A[0];A.splice(0,1);B.history.postStatus=A;UWA.Services.FeedHistory.upgrade(B)}else{var C=B.items.length;for(var D=0,C=A.length;D<C;D++){B.history[A[D]]=true}}}}UWA.Services.FeedHistory.cleanup(B)};
UWA.Services.FeedHistory.cleanup=function(B){
	var A={};var C=B.items.length;for(var D=0;D<C;D++){if(B.history[B.items[D].id]){A[B.items[D].id]=B.history[B.items[D].id];continue}if(B.history[B.items[D].id_old]){A[B.items[D].id]=B.history[B.items[D].id_old];continue}}B.history=A};
UWA.Services.FeedHistory.upgrade=function(A){
	if(!A.history.lastPostId){return false}if(A.history.lastPostId==A.items[0].id||A.history.lastPostId==A.items[0].id_old){var E=A.history.postStatus.slice()}else{var B=[];var C=A.items.length;var D;for(var F=0;F<C;F++){if(A.history.lastPostId==A.items[F].id||A.history.lastPostId==A.items[F].id_old){D=F;break}}for(var F=0;F<C;F++){if(F<D||!D){B[F]=0}else{B[F]=A.history.postStatus[F-D]}}var E=B}A.history={};var C=A.items.length;for(var F=0;F<C;F++){if(E[F]==1){A.history[A.items[F].id]=true}}};
UWA.Services.FeedHistory.getString=function(C){
	if(!C.history){return""}var D="";var B="";for(var A in C.history){if(!C.history[A]){continue}D+=B+A;B=":"}return D};
UWA.Services.FeedHistory.getNbNew=function(B,A){
	if(!B||!B.history){return 0}var C=B.items.length;var E=0;A=C<A?C:A;for(var D=0;D<A;D++){if(!B.history[B.items[D].id]){E+=1}}return E};
UWA.Services.FeedHistory.setRead=function(B,A){
	if(typeof B.history=="undefined"){return }B.history[B.items[A].id]=true};
UWA.Services.FeedHistory.setUnRead=function(B,A){
	if(typeof B.history=="undefined"){return }delete B.history[B.items[A].id]};
UWA.Services.FeedHistory.isRead=function(B,A){
	if(B.history[B.items[A].id]){return true}return false};
if(typeof App=="undefined"){App={}}
if(typeof App.Rss=="undefined"){App.Rss={}}
App.Rss.buildHistory=UWA.Services.FeedHistory.build;
App.Rss.getHistoryString=UWA.Services.FeedHistory.getString;
App.Rss.getHistoryNbNew=UWA.Services.FeedHistory.getNbNew;;

//79
UWA.Templates.multifeeds=function(A){
	this.widget=(A?A:widget);this.tabSet=null;this.miniTabs=null;this.currentId=0;this.firstLaunch=true;this.selectedTab=0
};
UWA.Templates.multifeeds.prototype={
	createFromXML:function(A){
		var B={};
		B.header=this.getHeader(A);
		B.tabSet=this.getTabset(A);
		B.provider=UWA.XMLTemplate.getElement("feeds",A).getAttribute("provider");
		B.container=this.widget.createElement("div").injectBefore(A);
		A.remove();
		return this.createFromJSON(B)
	},
	createFromJSON:function(A){
		this.tabSet=A.tabSet;this.header=A.header;this.widget.setValue("provider",A.provider);this.container=(typeof A.container=="string"?this.widget.body.getElement(A.container):A.container);this.init()
	},
	getTabset:function(B){
		var C={tabList:[],tabContent:{},container:null};
		var A=UWA.XMLTemplate.getElements("feed",B);
		A.forEach(function(E,D){
			C.tabList.push({"for":D,text:E.getAttribute("text")});C.tabContent[D]={src:E.getAttribute("url")}
		});
		return C
	},
	getHeader:function(C){
		var D={background:null,img:[{src:null}],container:null};var B=UWA.XMLTemplate.getElement("header",C);if(B){D.background=B.getAttribute("background");var A=UWA.XMLTemplate.getElements("img",C);D.img=[];A.forEach(function(E,G){var F={};F.src=A[G].getAttribute("src");F.position=A[G].getAttribute("position");D.img.push(F)})}return D
	},
	init:function(){
		var A=this;
		var B=this.widget;
		B.onLoad=function(){
			B.body.setStyle("padding",0);A.load()
		};
		B.onRefresh=this.displayTab.bindWithEvent(this);
		B.updateDisplay=this.displayTab.bindWithEvent(this);
		B.mergePreferences([{name:"category",type:"hidden",label:"Category",onchange:"onChangeCategory"},{name:"nbTitles",type:"range",label:"Number of items to display",defaultValue:"3",step:"1",min:"1",max:"25",onchange:"updateDisplay"},{name:"details",type:"boolean",label:"Show more details",defaultValue:"true",onchange:"updateDisplay"},{name:"showDate",type:"boolean",label:"Show post date",defaultValue:"true",onchange:"updateDisplay"},{name:"openOutside",type:"boolean",label:"Open directly on the site",defaultValue:"false",onchange:"updateDisplay"},{name:"videoAutoPlay",type:"hidden",label:"Show the video at startup",defaultValue:"false"},{name:"numberTabs",type:"hidden",defaultValue:"4"},{name:"selectedTab",type:"hidden",defaultValue:"0"},{name:"title",type:"hidden",defaultValue:"MultipleFeeds"},{name:"lookForHtmlThumbnail",type:"hidden",defaultValue:"true"},{name:"provider",type:"hidden",defaultValue:"google"},{name:"numberTabs",type:"hidden",defaultValue:"4"},{name:"listOrder_"+B.getValue("provider"),type:"hidden",defaultValue:""}])
	},
	load:function(){
		var E=this.widget;this.container.empty();this.createHeader();var F=(this.tabSet.tabList.length>E.getInt("numberTabs"))?E.getInt("numberTabs"):this.tabSet.tabList.length;this.listOrder=this.getListOrder(F);this.miniTabs=new UWA.Controls.TabView({dataKey:"for",autohideDropdowns:true,softPadding:true});for(var D=0;D<F;D++){var C=this.listOrder[D];var A=this.tabSet.tabList.slice(0);A.splice(C,1);A.unshift(this.tabSet.tabList[C]);this.miniTabs.addTab(D,A)}this.setListOrder(this.listOrder);this.miniTabs.observe("activeTabChange",this.onActiveTabChanged.bind(this));this.tabSet.container=this.widget.createElement("div",{styles:{clear:"both"}}).addClassName("tabSet").inject(this.container);this.miniTabs.appendTo(this.tabSet.container);var B=this.widget.getValue("selectedTab");if(B>F){this.widget.setValue("selectedTab",0)}this.miniTabs.selectTab(B);this.displayTab()
	},
	createHeader:function(){
		if(this.header){this.header.container=this.widget.createElement("div").addClassName("header").setStyle("text-align","center").inject(this.container);this.widget.body.style.background=this.header.background;for(o=0;o<this.header.img.length;o++){i=this.header.img[o];var A=this.widget.createElement("img",{src:i.src});if(i.position!="middle"){A.setStyle("float",i.position)}A.inject(this.header.container)}}
	},
	setListOrder:function(A){
		this.widget.setValue("listOrder_"+this.widget.getValue("provider"),A.join(","))
	},
	getListOrder:function(C){
		var E=this.widget;var D=E.getValue("listOrder_"+E.getValue("provider"));if(typeof D=="undefined"||D==""||D==0||D==null||this.tabSet.tabList.length<D.length){D=[];for(var B=0;B<C;B++){D.push(B)}return D}if(typeof D!="string"){E.setValue("listOrder_"+E.getValue("provider"),"");return this.getListOrder(C)}var A=D.split(",");return A
	},
	onActiveTabChanged:function(A,D){
		var C=this.widget;if(A==C.getValue("selectedTab")&&this.firstLaunch==false){for(var B=0;B<this.listOrder.length;B++){if(D["for"]==this.listOrder[B]){this.miniTabs.selectKey(B,this.listOrder[A],false);this.listOrder[B]=this.listOrder[A];break}}}this.firstLaunch=false;this.currentId=D["for"];this.listOrder[parseInt(A)]=this.currentId;this.setListOrder(this.listOrder);C.setValue("selectedTab",A);this.displayTab()
	},
	displayTab:function(){
		var A=this.tabSet.tabContent[this.currentId];if(A.src){var B=new UWA.Controls.Feed(this.widget);B.setOptions(this.getOptions());B.display(A.src,this.miniTabs.contentArray[this.widget.getInt("selectedTab")])}else{if(A.html){this.miniTabs.contentArray[this.currentId].setHTML(A.html)}}
	},
	getOptions:function(){
		var B=this.widget;var A={};["nbTitles"].forEach(function(C){A[C]=B.getValue(C)});["showDate","details","openOutside"].forEach(function(C){A[C]=B.getBool(C)});return A
	}
};;

//80
UWA.extend(
	UWA.Environment.prototype,
	{initialize:function(){this.netvibes={inline:true,iframed:false}},map:function(A,B){this.events=A;this.obj=B},onRegisterModule:function(){var C=this.module;this.obj.widget=C;C.id=this.obj.dataObj.id;for(var B in this.obj.dataObj.data){if(typeof this.obj.dataObj.data[B]=="string"){C.data[B]=this.obj.dataObj.data[B]}}UWA.extend(this.events,{refresh:function(){C.callback("onRefresh")},edit:function(){C.callback("onEdit")},doSearch:function(D){if(D!=""){C.callback("onSearch",D)}else{C.setSearchResultCount(false);C.callback("onResetSearch")}},print:function(){if(C.onPrint){return C.onPrint()}},resize:function(D){C.callback("onResize")},setAllAsReadOnMouseDown:function(){C.setUnreadCount(0);C.callback("onResetUnreadCount")},onKeyboardEnter:function(){App.keyboardFocus="module.action";C.callback("onKeyboardEnter")},onKeyboardAction:function(D){if(D=="esc"){App.keyboardFocus="module";return }C.callback("onKeyboardAction",D)},updateTheme:function(D){C.callback("onUpdateTheme",D)},unload:function(){delete C.autoRefreshInterval}});this.html.title=this.obj.elm_title;this.html.edit=this.obj.elm_editContent;this.html.body=this.obj.elm_moduleContent;this.html.icon=this.obj.elm_ico;this.html.header=this.obj.elm_moduleHeader;this.html.module=this.obj.elm_module;for(var A in this.html){C.elements[A]=UWA.$element(this.html[A])}C.body=C.elements.body;C.body.setAttribute("id","m_"+C.id);C.title=C.elements.title.innerHTML;if(window.App&&App.lang){C.lang=App.lang}if(window.User&&User.locale){C.locale=User.locale}else{if(window.App&&App.locale){C.locale=App.locale}}if(window.App&&App.dirRTL){C.dir="rtl"}C.isNew=this.obj.isNew;C.readOnly=(this.obj.readOnly?this.obj.readOnly:false);this.obj.dataObj.extendSearch=0;this.obj.refreshMode=true;this.setDelayed("launchModule",this.launchModule,1)},endEdit:function(){this.obj.endEditMode()},showEdit:function(){this.obj.showEdit()},getData:function(A){if(A=="feedUrl"&&this.obj.dataObj.feedUrl){return this.obj.dataObj.feedUrl}if(A=="_feedreaderTitle"&&this.obj.dataObj.title){return this.obj.dataObj.title}return this.obj.dataObj.data[A]},setData:function(A,B){if(A=="feedUrl"||A=="_feedreaderTitle"){if(A=="_feedreaderTitle"){A="title"}if(this.obj.dataObj[A]!=B){this.widget.log("setDataSpecial:"+A+":"+B);this.obj.dataObj[A]=B;if(typeof this.obj.dataObj.data[A]!="undefined"){delete this.obj.dataObj.data[A]}this.setDelayed("saveDatas",this.saveDatas,1000)}}else{if(this.obj.dataObj.data[A]!=B){this.widget.log("setData:"+A+":"+B);this.obj.dataObj.data[A]=B;this.setDelayed("saveDatas",this.saveDatas,1000)}}if(this.widget.sendToFrame){this.widget.sendToFrame("setValue",A,B)}},deleteData:function(A){this.widget.log("deleteData:"+A);delete this.obj.dataObj.data[A];this.setDelayed("saveDatas",this.saveDatas,1000);if(this.widget.sendToFrame){this.widget.sendToFrame("deleteValue",A)}return true},saveDatas:function(A){this.obj.save();if(typeof A=="function"){this.setDelayed("saveCallback",A,1000,false)}},setTabUnread:function(A){App.setTabUnread(this.obj.dataObj.id,this.obj.dataObj.tab,A)},setSearchResultCount:function(A){if(A===0){this.obj.hide()}else{if(A!=false){this.obj.show();this.obj.restoreStatus()}}this.setTabUnread(A);if(A>0){this.widget.setTitle(this.widget.title,'<span class="result">('+A+")</span>")}else{if(A===0){this.widget.setTitle(this.widget.title,'<span class="result">('+_("no results")+")</span>")}else{this.widget.setTitle(this.widget.title,"")}}},setUnreadCount:function(C){var A=this.widget.elements.title.getElementsByClassName("unread")[0];if(typeof A=="undefined"){var A=this.widget.createElement("a");A.title=_("Read All");A.addClassName("unread");var B=this.widget.createElement("span");B.addClassName("unread");A.appendChild(B);if("right"==App.userCustom.unreadPosition){this.widget.elements.title.appendChild(A);A.style.marginLeft="0.5ex"}else{this.widget.elements.title.insertBefore(A,this.widget.elements.title.firstChild);A.style.marginRight="0.5ex"}Event.observe(A,"mousedown",this.resetUnreadCount.bind(this),false);Event.observe(A,"mousedown",function(D){D.stop()},false)}if(C==0){A.hide()}else{A.firstChild.setHTML("("+C+")");A.show()}this.setTabUnread(C)},resetUnreadCount:function(){this.widget.setUnreadCount(0);this.widget.callback("onResetUnreadCount")},setTitle:function(A){A=A.stripTags();if(A!=this.obj.dataObj.title){this.obj.dataObj.title=A;this.obj.save()}this.handleLinksInTitle()},handleLinksInTitle:function(E){var D=this.html.title.getElementsByTagName("a");for(var B=0,C=D.length;B<C;B++){var A=D[B];A.target="_blank";Event.observe(A,"mousedown",function(F){F.stop()},false)}},getTitle:function(){return this.obj.dataObj.title},handleLinks:function(){var A=this.module.body.getElementsByTagName("a");for(var B=0,C;C=A[B];B++){C.target="_blank"}},onUpdateBody:function(){this.setDelayed("handleLinks",this.handleLinks,100)},onUpdatePreferences:function(){this.obj.options.editable=this.widget.preferences.some(function(A){return A.type!="hidden"})},setIcon:function(A){this.obj.updateFavicon(A)},getHistory:function(){return this.obj.dataObj.history},setHistory:function(A){this.obj.dataObj.history=A},saveHistory:function(){this.obj.saveHistory()},addStar:function(A){Netvibes.Starring.showPopup(A)},onLoadComplete:function(){this.obj.onLoadModule()}}
);

UWA.Native=UWA.Environment;

UWA.proxies={api:"/proxy/api2Proxy.php",rss:"/proxy/xmlProxy.php",ajax:"/proxy/ajaxProxy.php",feed:"/proxy/feedProxy.php",xml:"/data/xml/"};

UWA.feedCallbackType="feed";;

//81  ////从这里开始
App.Start=function(){
	App.dirRTL=(document.documentElement&&document.documentElement.dir=="rtl");
	////初始化Panel
	App.Panel.initialize();
	////添加隐藏帧,session,upload_target,comm
	App.addIframes();
	if(document.location.hash=="#signup"){App.showSignup()}
	if(App.isPremium()){
		Element.addClassName(document.body,"premium")
	}else{
		if(window.top.location==window.location){App.checkSmallDisplay();App.setBackButton()}
	}
	var H=new Tips($$("#top li[title]"));
	var K=$("collapseExpand");
	if(K){K.onclick=App.collapseExpand.bindAsEventListener(K)}
	var J=$("footerLink_home");
	if(J){
		J.innerHTML=_("Set Netvibes as your startpage");
		J.onclick=function(){
			if(Browser.isIE){
				this.style.behavior="url(#default#homepage)";this.setHomePage("http://www.netvibes.com")
			}else{App.showSetAsStartPage()}return false}
	}
	var L;
	["faq","blog"].each(function(R){
		L=$("footerLink_"+R);
		if(L){L.setAttribute("target","_blank")}
	});
	var G=(App.lang=="fr_FR")?"fr":"en";
	var P=$("footerLink_tos");
	if(P){P.onclick=function(){App.displaySiteInformation(NV_PATH+"js/loc/"+G+"_tos.html",this);return false}}
	var E=$("footerLink_privacy");
	if(E){E.onclick=function(){App.displaySiteInformation(NV_PATH+"js/loc/"+G+"_privacy.html",this);return false}}
	var Q=$("footerLink_about");
	if(Q){
		Q.onclick=function(){
			if(App.shortLang=="fr"){
				App.displaySiteInformation(NV_PATH+"js/loc/"+App.shortLang+"_about.html",this)
			}else{App.displaySiteInformation(NV_PATH+"js/loc/en_about.html",this)}
			return false
		}
	}
	var B=$("footerLink_feedback");
	if(B){
		B.onclick=function(){
			var R="feedbackForm";if(App.lang=="fr_FR"){R+="FR"}R+=".html";App.displaySiteInformation(NV_PATH+R,this);return false
		}
	}
	var M=$("footerLink_blog");
	if("fr"==G&&M){
		M.href="http://blog.netvibes.com/fr/"}
	var O=$("footer");
	var I=O.getFirst();I.addClass("collapsed");
	var N=new Element("a",{href:"javascript:void(0)",text:_("More")}).inject(I.getFirst());
	N.addEvent("click",function(){I.toggleClass("collapsed")});
	////右上角那个‘设置’按钮
	var D=$("userSettings");
	if(D){
		D.onclick=function(){SettingsPanel.open();return false}
	}
	////
	switch(App.initShow){
		case"feedback":B.onclick();break;case"about":Q.onclick();break
	}
	App.pageTitle=document.title;
	App.Start.setProfileLink();
	setTimeout('App.saveUserData("lastAccess")',10000);
	App.attachTitleEvents();App.Search.attachEvents();
	var A=$("modulesArea");
	App.ColManager=new App.Columns(A,{enableResize:(!App.staticUniverse)});
	var F=document.createElement("div");
	F.id="feedReader";A.appendChild(F);
	App.FeedReader.elm=$("feedReader");
	$("pageLoading").remove();App.userCustom=App.userData.custom;
	if(undefined==App.userCustom.showTitle){App.userCustom.showTitle=1}
	if(undefined==App.userCustom.showFeedNav){App.userCustom.showFeedNav=1}
	if(undefined==App.userCustom.rssSpace){App.userCustom.rssSpace=0}
	if(undefined==App.userCustom.hideFavIcons){App.userCustom.hideFavIcons=0}
	if(undefined==App.userCustom.dontPreload){App.userCustom.dontPreload=1}
	if(undefined==App.userCustom.keyboardNav){App.userCustom.keyboardNav=0}
	if(undefined==App.userCustom.hideSearch){App.userCustom.hideSearch=1}
	if(undefined==App.userCustom.unreadPosition){App.userCustom.unreadPosition="left"}
	if(undefined==App.userCustom.enableFx){App.userCustom.enableFx=1}
	App.userCustom.announcement=JSON.decode(App.userCustom.announcement)||[];
	if(typeof App.userCustom.announcement=="number"||typeof App.userCustom.announcement=="string"){App.userCustom.announcement=[]}
	if(App.visit&&App.visit.my){App.messageWithID(3,_("You are now editing your universe, your netvibes public page."))}
	App.ColManager.updateLayout(true);
	if(App.queryStart!=""){App.userCustom.hideSearch=0}
	if(App.searchBox){
		App.searchBox.style.visibility=((App.userCustom.hideSearch&&App.userCustom.hideSearch==1)||App.staticUniverse)?"hidden":"visible"
	}
	if(App.userCustom.rssSpace&&App.userCustom.rssSpace=="1"){App.insertCssFile("/themes/base/rssspace.css")}
	if(App.userCustom.bodyBackground){App.insertCssFile("/themes/base/noborder.css")}
	if(/^(zh|ko|ja)$/.test(App.shortLang)){App.insertCssFile("/themes/base/loc-"+App.shortLang+".css")}
	Event.observe(document,"keydown",App.keyboardHandler);
	User.email=App.userData.userEmail;
	if(App.userData.emailConfirmed){User.emailConfirmed=true}
	User.username=App.userData.username;
	User.feedsId=App.userData.userFeeds;
	if(document.location.hash=="#invite-friends"){
		App.Panel.toggle("Friends");App.Panel.setActiveTopBar($("userFriends"));App.Panel.Friends.tabs.selectTab("inviteFriends")}
	if(document.location.hash=="#view-profile"){App.Panel.toggle("Profile");App.Panel.setActiveTopBar($("userProfile"))}
	var C=Cookie.get("registered");
	if(C==1){
		App.showMessageBox("ConfirmRegistered");Cookie.remove("registered")
	}else{
		if(C==2){
			App.showMessageBox("FindFriends");
			Cookie.remove("registered")
		}
	}
	if(!App.isPremium()&&!App.visit&&!C){
		if(!App.registeredUser&&(App.userCustom.announcement.contains(100)||!App.wizardCustomEnabled())){
			App.showMessageBox("SaveYourPage")
		}else{
			if(!App.userCustom.announcement.contains(100)&&App.wizardCustomEnabled()){App.showMessageBox("Welcome")}
		}
	}
	App.Start.createTabs();App.TabOptions.attachEvents();
	if(App.subscribeOnLoad&&!App.staticUniverse){App.Subscribe.doSubscribe()}else{App.Start.loadModules()}
};

App.Start.setProfileLink=function(){
	var A=$("signInLink");
	if(A){
		if(App.registeredUser){
			A.onclick=function(){
				arguments.callee.queue=arguments.callee.queue||0;
				if(arguments.callee.queue>0){return false}
				++arguments.callee.queue;
				setTimeout(function(){this.queue=0}.bind(arguments.callee),500)
			}
		}else{A.onclick=function(){$("tooltip").style.display="none";App.Login.show();return false}}
	}};

App.attachTitleEvents=function(){
	if(App.staticUniverse){return false}
	var A=$("pageTitle");
	A.firstChild.onmouseover=function(){
		this.style.backgroundColor="#FAFAFA";
		this.foregroundColor=this.style.color;
		this.style.color="#333";
		this.style.border="1px solid #EEE"
	};
	A.firstChild.onmouseout=function(){this.style.backgroundColor="transparent";this.style.color=this.foregroundColor;this.style.border="none"};
	A.firstChild.onclick=function(){
			App.keyboardFocus="edit";
			this.onclick=null;
			this.onmouseout();
			this.onmouseover=null;
			var B=this.firstChild.nodeValue;
			var E=this.offsetWidth;
			var D=document.createElement("input");
			D.type="text";D.className="inputPageTitle";
			D.maxlength=80;D.value=B;D.style.width=E+"px";
			this.innerHTML="";this.appendChild(D);D.focus();D.select();
			Event.observe(D,"keydown",C,false);
			function C(F){if(!Browser.isSafari){if(F.key=="enter"){D.onblur()}}}
			D.onkeyup=function(){this.style.width=(this.value.length*8)+20+"px"};
			D.onblur=function(){
				var G=(this.value.trim()=="")?_("Type your page title here"):this.value;
				var F=this.parentNode;
				F.innerHTML="";
				F.appendChild(document.createTextNode(G));
				if(G!=B){App.saveUserData("pageTitle",G);document.title=G;App.pageTitle=G}
				App.attachTitleEvents();
				App.keyboardFocus="modules";App.retainKeyboardFocus()
			}
	}
};
App.Start.existingTabs={};
App.Start.createModules=function(){
	var C=0;var B=[];
	var F=App.selectedTab;
	App.selectedTab=0;
	for(var G=0,A=App.userData.modules.length;G<A;G++){
		var E=App.userData.modules[G];if(!App.Modules[E.name+"Infos"]){B.push(E.id);continue}var H=E.tab||-1;if(!App.Start.existingTabs[H]){H=-1;C++}var D={id:E.id,container:E.col||E.column,row:E.row,tab:H,moduleName:E.name,title:E.title||"",status:E.status,share:E.share,history:E.data.history||"",data:E.data};if(E.data.feedUrl){D.feedUrl=E.data.feedUrl}App.moduleList.push(new Module($unlink(D)))
	}
	if(C>0){App.Tabs.createLostTab(C)}
	for(var G=0;G<B.length;G++){App.saveUserData("close",{id:B[G]})}
	App.selectedTab=F};
App.Start.createTabs=function(){
	var K=App.userData.tabs.length;var H=true;var E=0;var D=0;
	if(App.visit){D=Cookie.get("opentab_u")}else{D=Cookie.get("opentab")}
	if(document.location.hash.length>1){D=decodeURIComponent(document.location.hash.substr(1))}
	for(var G=0;G<K;G++){
		var I=App.userData.tabs[G];var B=I.id;if(H||B==D){E=App.tabList.length;H=false}App.Start.existingTabs[B]=true;var J=I.title||"";if(H||(J&&String.toAnchor(J)==D)){E=App.tabList.length;H=false}var L=I.columnSizes||[];var A={id:I.id,title:J,sort:G,unread:I.unread,icon:I.icon||"",cols:I.cols,columnSizes:L,access:I.access,topic:I.topic};var F=new PageTab($unlink(A));F._savedColumnSizes=$A(L);App.tabList.push(F)
	}
	if(K==0){$("divTabs").style.display="none"}
	if(App.staticUniverse){var C=$("aNewTab");if(C){C.destroy()}}
	App.selectedTabObj=App.tabList[E];
	App.selectedTab=App.selectedTabObj.dataObj.id};
App.Start.initUserCustom=function(){};
App.Subscribe={};
App.Subscribe.subscribeOnFeed=function(F,E,C,X){
	App.keyboardFocus="edit";var J=-1;var W=$("startMsg");
	if(E=="preconfig"){
		W.innerHTML=_("Loading Module Preconfiguration")+"...";
		var H="";
		App.Request.sendPOST(NV_PATH+"ajax/sendModule/get.php?id="+F,H,function(Y){
			var Z=Y.responseText.parseJSON();App.subscribeData=Z.data;
			if(Z.name=="tab"){App.subscribeColumns=Z.columns;App.subscribeModuleCount=Z.modulecount;E="tab"}else{E="module"}return App.Subscribe.subscribeOnFeed(Z.name,E,"preconfig",Z.title)
		});
		J=F;return false
	}
	var T=E;var R;
	if(C=="preconfig"){
		var M=F;
		switch(M){case"RssReader":M="feed";R=App.subscribeData.feedUrl;break;case"Ical":M="calendar";R=App.subscribeData.icalUrl;break;case"Api":M="api module";R=App.subscribeData.moduleUrl;break;case"tab":M="tab";R=X+" ("+App.subscribeModuleCount+" "+_("Modules")+")";if(App.subscribeData.icon&&App.subscribeData.icon!=""){R="<img src='"+App.subscribeData.icon+"' width=16 height=16 /> "+R}break}
		T=_("preconfigured {0}").format(M)
	}
	if(T=="webcal"){T="Ical"}
	W.innerHTML="";
	var V=new Element("div").inject(W);
	var S="";S+='<div><input type="button" value="'+_("Add to my netvibes")+'" class="subscribeButton button" />&nbsp;&nbsp;&nbsp;&nbsp;<input style="display:none" type="button" value="'+_("Cancel")+'" class="subscribeButton button" /></div>';
	if(E=="tab"){S+='<div id="subscribePreviewTab"></div>'}else{S+='<div id="subscribePreviewModule"></div>'}
	S+='<div class="subscribeWarning">'+_("Netvibes cannot be held responsible for content, functionality, availability or performance of this module. If you have any concerns or queries, please send a report to its Developer and our <a href='http://www.netvibes.com/static.php?show=feedback'>support team</a>")+"</div>";
	V.innerHTML=S;
	var A=new Element("div").inject(W);
	A.setStyle("clear","both");	A.setStyle("height",30);
	var D=W.getElementsByTagName("input");
	var N,U,O;App.inSubscribePreview=true;N="";var L={},K={};
	switch(E){case"module":N=F;K=App.subscribeData||{};if(F=="RssReader"&&typeof App.subscribeData.feedUrl!="undefined"){F=App.subscribeData.feedUrl;L={feedUrl:F};K.feedUrl=F}break;case"api":N="Api";K.moduleUrl=F;break;case"webcal":case"ical":N="Ical";K.icalUrl=F;break;case"tab":var B=new App.Columns($("subscribePreviewTab"),{enableResize:false});if(App.subscribeData.cols>0){B.numCols=App.subscribeData.cols}else{for(var I=0;I<4;I++){if(!App.subscribeColumns[I]){continue}B.numCols=I+1}}if(App.subscribeData.columnSizes){B.columnSizes=App.subscribeData.columnSizes}B.updateLayout();var G;for(var I=0;I<4;I++){if(!App.subscribeColumns[I]){continue}G=App.subscribeColumns[I].length;col=I+1;for(var P=0;P<G;P++){N=App.subscribeColumns[I][P];if(N.name=="MailWizard"){continue}defaultDataObj=App.Modules[N.name+"Infos"].defaultObj;O={};for(var Q in defaultDataObj){if(typeof defaultDataObj.hasOwnProperty!="string"&&!defaultDataObj.hasOwnProperty(Q)){continue}if(typeof defaultDataObj[Q]=="function"){continue}O[Q]=defaultDataObj[Q]}O.data={};for(var Q in defaultDataObj.data){if(typeof defaultDataObj.data.hasOwnProperty!="string"&&!defaultDataObj.data.hasOwnProperty(Q)){continue}if(typeof defaultDataObj.data[Q]=="function"){continue}O.data[Q]=defaultDataObj.data[Q]}O.container=B["col"+col];O.admin=true;O.tab=App.selectedTab;if(N.name=="RssReader"){O.feedUrl=N.data.feedUrl}for(var Q in N){if(typeof N.hasOwnProperty!="string"&&!N.hasOwnProperty(Q)){continue}if(typeof N[Q]=="function"){continue}O[Q]=N[Q]}for(var Q in N.data){if(typeof N.data.hasOwnProperty!="string"&&!N.data.hasOwnProperty(Q)){continue}if(typeof N.data[Q]=="function"){continue}O.data[Q]=N.data[Q]}App.subscribeColumns[I][P]=U=new Module(O).load(true);U.name=N.name;delete N;delete U}}break;default:N="RssReader";K=App.subscribeData||{};L.feedUrl=Utils.getSafeUrl(F);if(!isNaN(C)){K.feedId=C}}
	if(E=="tab"){}else{O=$unlink(App.Modules[N+"Infos"].defaultObj);O=$merge(O,L);O.data=$merge(O.data||{},K);O.tab=App.selectedTab;if(typeof X=="string"){O.title=X}U=new Module(O,{nativise:true,preview:true}).inject("subscribePreviewModule").load()}
	D[0].onclick=function(){App.Subscribe.onSubscribeClicked(U,E,J,X);return false};
	D[1].onclick=App.Subscribe.backToMyPage};
App.Subscribe.onSubscribeClicked=function(F,E,D,G){
	if(E=="tab"){var J={};if(App.subscribeData.icon){J.icon=App.subscribeData.icon}if(App.subscribeData.columnSizes){J.columnSizes=App.subscribeData.columnSizes}if(App.subscribeData.cols){J.cols=App.subscribeData.cols}var K=NewPageTab({title:G,defaultDataObj:J});var I=[],H,A;for(var J=0;J<4;J++){if(!App.subscribeColumns[J]){continue}ln=App.subscribeColumns[J].length;A=ln*100;for(var C=ln-1;C>=0;C--){F=App.subscribeColumns[J][C];if(F.name=="MailWizard"){continue}F.isNew=true;F.dataObj.container=J+1;F.dataObj.subscription=true;if(F.name=="RssReader"){if(typeof F.widget.addNewFeed=="function"){F.widget.addNewFeed()}else{if(typeof F.content.addNewFeed=="function"){F.content.addNewFeed()}}}F.tab=K.dataObj.id;F.previewMode=false;F.addModuleToPage();F.dataObj.row=A;A-=100;App.moduleList.push(F);I.push(F)}}App.saveUserData("newtab_mod",[K.dataObj,I])}else{F.dataObj.container=1;F.previewMode=false;F.dataObj.subscription=true;if(App.subscribeData&&App.subscribeData.campaignActive&&App.subscribeData.campaignActive==1&&App.subscribeData.ecoId){F.dataObj.campaignActive=true;F.dataObj.ecoId=F.dataObj.widgetId=App.subscribeData.ecoId}if($defined(F.dataObj.feedUrl)){if(typeof F.widget.addNewFeed=="function"){F.widget.addNewFeed()}else{if(typeof F.content.addNewFeed=="function"){F.content.addNewFeed()}}}F.dataObj.subscribeType=E;F.addModuleToPage();App.moduleList.push(F);App.saveUserData("new",F)}if(D!=-1){var B="";if(App.visit&&App.visit.id){B="&visit="+App.visit.id}App.Request.sendPOST(NV_PATH+"ajax/sendModule/report.php?preconf="+D,B,function(){})}if(F.content.resize){F.content.resize()}App.Start.loadModules();App.Subscribe.backToMyPage()};
App.Subscribe.backToMyPage=function(){
	App.inSubscribePreview=false;$("startMsg").empty().hide();$("top").getElement("span").remove();$("application").style.display="block";$(document.body).removeClass("subscribe");App.keyboardFocus="module";var A=$("topbarUser");A.hide();A.show.delay(100,A)};
App.Subscribe.addFeedResponse=function(D,F,B){
	var I=$("startMsg");if(D.status==401||D.statusText.toLowerCase()=="unauthorized"){B="auth";F=Utils.getSafeUrl(F,true,true)}if(B=="site"){var A=function(K){var J=K.responseText.parseJSON();if(J.length==1){App.Subscribe.subscribeOnFeed(J[0].url,"feed")}else{if(J.length>1){var N='<div class="subscribeHeader">'+_("Please choose the feed you want to add to your page:")+"</div>";N+='<div class="subscribeAutoDiscovery">';for(var M=0;M<J.length;M++){if(J[M].title!=""&&J[M].title!=null){N+='<div class="feedboxselection feedboxselection-'+J[M].type+'"><div>'+J[M].title+'</div><div class="url">'+J[M].url+"</div></div>"}else{N+='<div class="feedboxselection feedboxselection-'+J[M].type+'"><div>'+J[M].url+"</div></div>"}}N+="</div>";I.innerHTML=N;var L=$(I).getElementsByClassName("feedboxselection");for(var M=0;M<L.length;M++){L[M].setAttribute("index",M);L[M].onmouseover=function(){this.style.backgroundColor="#FFFFB0"};L[M].onmouseout=function(){this.style.backgroundColor="#FFFFE6"};L[M].onclick=function(){I.innerHTML=_("Loading ...");App.Subscribe.subscribeOnFeed(J[this.getAttribute("index")].url,"feed")}}}else{I.innerHTML=_("No valid feeds were found to add to your page")}}};App.Request.sendGET(NV_PATH+"feedAutodiscovery.php?url="+encodeURIComponent(App.subscribeTo),A)}else{if(B=="api"){App.Subscribe.subscribeOnFeed(F,"api","api")}else{if(B=="webcal"){App.Subscribe.subscribeOnFeed(F,"webcal")}else{if(!isNaN(B)){App.Subscribe.subscribeOnFeed(F,"feed",B)}else{if(B=="rss"||B=="feed"||(typeof D.getResponseHeader=="function"&&D.getResponseHeader("Content-type").substr(0,16)=="application/json")){App.Subscribe.subscribeOnFeed(F,"feed")}else{if(B=="auth"){var G='<form id="authForm"><label>'+_("Username:")+' <input type="text" size="8" value="" /></label>&nbsp;&nbsp;&nbsp;<label>'+_("Password:")+' <input type="password" size="8" value="" /></label></form>';var H='<div id="subscribeAuth"><div class="subscribeHeader">'+_("The feed you want to subscribe to requires authorization:")+"</div>";H+='<div class="subscribeFeed" style="margin-bottom: 10px">'+F+" <br /><br />"+G+"</div>";H+='<div id="previewConfirm"><input type="button" value="'+_("OK")+'" class="subscribeButton button" id="authSubmit" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="'+_("Cancel")+'" class="subscribeButton button" id="authCancel" /></div></div>';I.innerHTML=H;var C=function(){var K=F.trim();var J=I.getElementsByTagName("input");var L;if(K.substr(0,7)=="http://"){L=7}else{if(K.substr(0,8)=="https://"){L=8}else{L=7;K="http://"+K}}K=K.substr(0,L)+encodeURIComponent(J[0].value)+":"+encodeURIComponent(J[1].value)+"@"+K.substr(L);I.innerHTML=_("Loading ...");App.addNewFeed(K,App.Subscribe.addFeedResponse);return false};var E=I.getElementsByTagName("input");E[0].focus();$("authSubmit").onclick=C;$("authForm").onsubmit=C;$("authCancel").onclick=App.Subscribe.cancelSubscribe}else{if(D.responseText==""||!D.responseXML||D.responseXML.documentElement==null||D.responseXML.documentElement.nodeName=="parsererror"){I.innerHTML=_("The feed you are about to add to your page is not valid")}else{App.Subscribe.subscribeOnFeed(F,"feed")}}}}}}}};
App.Subscribe.doSubscribe=function(){
	App.subscribeOnLoad=false;App.keyboardFocus="edit";var A=new Element("span",{"class":"back"}).injectBefore($("topbarContent"));A.innerHTML='<a class="back" href="'+App.location+'">'+_("Back to my page")+"</a>";var B=$("startMsg");B.set("style","display:block");App.subscribeTo=App.subscribeTo.unescapeHTML();switch(App.subscribeType){case"module":if(App.subscribeTo!="aolMail"){App.subscribeTo=App.subscribeTo.substr(0,1).toUpperCase()+App.subscribeTo.substr(1)}if(!App.Modules[App.subscribeTo+"Infos"]){App.Start.loadModules();break}case"preconfig":case"webcal":case"api":case"feed":case"rss":App.Subscribe.subscribeOnFeed(App.subscribeTo,App.subscribeType,App.subscribeType);break;default:App.addNewFeed(App.subscribeTo,App.Subscribe.addFeedResponse,App.subscribeType)}};
App.preloadModules=function(){
	for(var B=0,A=App.tabList.length;B<A;B++){var C=App.tabList[B];if(C.dataObj.id==App.selectedTabObj.dataObj.id){continue}C.loadModules()}};
App.Start.loadModules=function(){
	App.Start.createModules();
	$("startMsg").style.display="none";$("application").style.display="block";
	$("footer").style.display="block";App.keyboardFocus="module";
	App.selectedTabObj.switchTo(true);
	if(App.userCustom.dontPreload!="1"){App.preloadModules.delay(1000)}
	delete App.Start;delete App.userData;App.userData=null
};;

//82
App.Modules.feedreader=function(D){
	var B=new UWA.Native();
	B.map(this,D);
	var C=B.getModule();
	C.setPreferences(
		[{name:"_feedreaderTitle",type:"text",label:"Title"},
		 {name:"feedUrl",type:"text",label:"Feed",defaultValue:""},
		 {name:"nbTitles",type:"range",label:"Number of items to display",defaultValue:"7",step:"1",min:"1",max:"25",onchange:"updateDisplay"},
		 {name:"openOutside",type:"boolean",label:"Open directly on the site",defaultValue:"false",onchange:"updateDisplay"},
		 {name:"details",type:"boolean",label:"Show more details",defaultValue:"false",onchange:"updateDisplay"},
		 {name:"showDate",type:"boolean",label:"Show post date",defaultValue:"true",onchange:"updateDisplay"},
		 {name:"lookForHtmlThumbnail",type:"hidden",defaultValue:"false"}]
	);
	C.body.addClassName("feedreader");
	var A={};
	A.feed=false;
	A.elements=[];
	A.offset=0;A.search="";A.correctlyDisplayed=false;
	A.autoRefreshState=true;
	A.detectType=function(){
		C.log("FeedReader.detectType()");
		var F=A.feed.items;
		for(var G=0;G<F.length;G++){
			if(F[G].thumbnail||(F[G].enclosures&&F[G].enclosures[0]&&/^image\/(jpeg|gif|jpg|bmp|png)$/.test(F[G].enclosures[0].type))||(C.getBool("lookForHtmlThumbnail")==true&&/<img.*?src=('|")?(.*?)('|"| ).*?>/i.test(F[G].content))){C.setValue("details","true");break}}if(C.getBool("details")){C.setValue("nbTitles",3)}};A.checkResponse=function(F){C.log("FeedReader.checkResponse()");if(!F||F.error){A.showError(_("Error"),_("Looks like this feed is not valid or currently not responding."));return }if(F.status==401){A.showError(_("Unauthorized"),_("You don't have the required authorization to access this feed."));return }if(!F.items){A.showError(_("Error"),_("Looks like this feed is not valid or currently not responding."));return }A.display(F)};A.addFeedResponse=function(F,H,G){C.log("FeedReader.addFeedResponse()");if(G=="site"){A.showError(_("Error"),_("You need to enter the URL of an RSS or ATOM feed. For adding this site, please use the Add content menu."))}else{C.setValue("feedId",G);A.checkResponse(UWA.Utils.parseFeed(F))}};A.display=function(L){C.log("FeedReader.display()");if(typeof L!="undefined"){A.feed=L;if(C.getValue("feedUrl").match(/https?:\/\/([^\/]*?)@/)&&C.elements.icon)
			{
				C.elements.icon.setHTML('<img width="16" height="16" alt="Http Authenticated" title="Http Authenticated" src="img/lock.gif" />')
			}else{
				C.setIcon(L.htmlUrl)
			}
			UWA.Services.FeedHistory.build(C.readOnly?"":C.getHistory(),A.feed);
			if(C.isNew==true){
				A.detectType();C.setValue("_feedreaderTitle",L.title);
				if(typeof C.getHistory()!="undefined"){C.saveHistory()}C.isNew=false
			}else{
				if(!C.getValue("_feedreaderTitle")||C.getValue("_feedreaderTitle")==""){C.setValue("_feedreaderTitle",L.title)}
			}
			C.writeTitle('<a href="'+L.htmlUrl+'" target="_blank">'+C.getValue("_feedreaderTitle")+"</a>");
			if(typeof L.dir!="undefined"&&L.dir=="rtl"){
				C.dir="rtl";C.body.dir="rtl";
				if(typeof C.body.parentNode!="undefined"){
					Element.addClassName(C.body.parentNode,"rtl");Element.removeClassName(C.body.parentNode,"ltr")
				}
			}else{
				C.dir="ltr";C.body.dir="ltr";
				if(typeof C.body.parentNode!="undefined"){
					Element.addClassName(C.body.parentNode,"ltr");Element.removeClassName(C.body.parentNode,"rtl")
				}
			}
		}
		if(A.feed.items.length==0){
			A.showError(_("Error"),_("No items in feed."));return 
		}
		C.preferences[2].max=A.feed.items.length;
		A.FeedView=new UWA.Controls.FeedView(
			{details:C.getBool("details"),
			 showDate:C.getBool("showDate"),
			 lookForHtmlThumbnail:C.getBool("lookForHtmlThumbnail"),
			 search:A.search,
			 dir:C.dir}
		);
		A.FeedView.observe("onclick",A.onClick);
		A.FeedView.observe("onmiddleclick",A.onMiddleOrRightClick);
		A.FeedView.observe("onrightclick",A.onMiddleOrRightClick);
		A.FeedView.observe("onpodcastplay",A.onPodcastPlay);
		A.FeedView.observe("ondownload",A.onDownload);
		if(C.isInNativeMode()&&C.readOnly!=true){A.FeedView.observe("onaddstar",A.onAddStar)}
		A.limit=C.getInt("nbTitles");
		var G=A.feed.items.length-A.offset;G=G>A.limit?A.limit:G;
		for(var J=0;J<G;J++){
			var H=A.offset+J;
			var K=A.feed.items[H];
			A.FeedView.addItem(H,K,UWA.Services.FeedHistory.isRead(A.feed,H))
		}
		if(A.search!=""){C.setSearchResultCount(A.FeedView.getNumberOfDisplayedItems())}
		C.setBody(A.FeedView.getContent());
		var I=UWA.Services.FeedHistory.getNbNew(A.feed,A.feed.items.length);
		var F=new UWA.Controls.Pager({module:A,limit:A.limit,offset:A.offset,dataArray:A.feed.items});
		F.onChange=function(M){this.module.offset=M;this.module.display()};
		A.pagerContent=F.getContent();
		A.pagerContent.style.display="none";
		C.addBody(A.pagerContent);
		A.correctlyDisplayed=true;
		if(!C.isInNativeMode()||App.userCustom.showFeedNav=="1"){
			A.pagerContent.style.display="block";if(C.readOnly!=true&&A.search==""){C.setUnreadCount(I)}
		}else{
			if(C.readOnly!=true&&A.search==""){C.setUnreadCount(UWA.Services.FeedHistory.getNbNew(L,A.limit))}
		}
		C.onLoadComplete()
	};
	A.onClick=function(G){
		if(typeof D!="undefined"&&D.previewMode){return true}A.setRead(G.index);if(C.getBool("openOutside")==true||App.inSubscribePreview){return false}var F=A.feed;if(typeof App.FeedReader!="undefined"){App.FeedReader.display({title:A.feed.title,moduleLocalData:A,selectedItemIndex:G.index,moduleObj:A.pub,contentObj:A.pub,proxy:"proxy/feedProxy.php?url="+encodeURIComponent(C.getValue("feedUrl"))+"&g"})}else{if(typeof Netvibes.UI.EmbedFeedReader!="undefined"){new Netvibes.UI.EmbedFeedReader(A.feed,G.index)}else{if(typeof C!="undefined"&&C.openURL){C.openURL(F.items[G.index].link)}}}return true
	};
	A.onMiddleOrRightClick=function(F){
		A.setRead(F.index)
	};
	A.onPodcastPlay=function(F){
		if(C.isInNativeMode()){if(App.inSubscribePreview){alert(_("Sorry, this feature is not available in preview mode."));return false}A.setRead(F.index);App.launchPlayer(F.fileLink,F.podName);return false}else{A.setRead(F.index);return true}
	};
	A.onDownload=function(F){
		A.setRead(F.index);C.openURL(F.mediaUrl);return true
	};
	A.onAddStar=function(G){
		var F=A.feed.items[G.index];C.addStar({title:F.title,url:F.link});return true
	};
	A.setRead=function(F){
		C.log("FeedReader.setRead()");
		var H=A.feed;
		if(UWA.Services.FeedHistory.isRead(H,F)==false){
			UWA.Services.FeedHistory.setRead(H,F);A.FeedView.setRead(F);UWA.Services.FeedHistory.setRead(H,F);C.setHistory(UWA.Services.FeedHistory.getString(H));C.saveHistory();var G=UWA.Services.FeedHistory.getNbNew(H,H.items.length);if(C.isInNativeMode()){if(App.userCustom.showFeedNav=="1"){if(C.readOnly!=true){C.setUnreadCount(G)}}else{if(C.readOnly!=true){C.setUnreadCount(UWA.Services.FeedHistory.getNbNew(A.feed,C.getValue("nbTitles")))}}}else{C.setUnreadCount(G)}
		}
	};
	A.showError=function(G,F){
		if(A.correctlyDisplayed===true){var G=C.getValue("_feedreaderTitle");if(G){C.writeTitle(G)}return }C.setBody(F)
	};
	A.pub={};
	A.pub.save=function(){C.log("FeedReader.pub.save()")};
	A.pub.setHistory=function(F){C.log("FeedReader.pub.setHistory();");C.setHistory(F)};
	A.pub.saveHistory=function(){C.log("FeedReader.pub.saveHistory()");C.saveHistory()};
	A.pub.getItemNode=function(F){C.log("FeedReader.pub.getItemNode()");return A.FeedView.getItem(F)};
	A.pub.setFeedTitle=function(){
		C.log("FeedReader.pub.setFeedTitle()");C.setFeedTitle(false);C.setHistory(UWA.Services.FeedHistory.getString(A.feed))
	};
	A.pub.setAllAsRead=function(){
		C.log("FeedReader.pub.setAllAsRead()");for(var F=0;F<A.FeedView.getNumberOfDisplayedItems();F++){if(UWA.Services.FeedHistory.isRead(A.feed,F)==true){A.FeedView.setRead(F)}else{A.FeedView.setUnRead(F)}}A.pub.setFeedTitle()
	};
	A.pub.getShowPage=function(){
		C.log("FeedReader.pub.getShowPage()");return parseInt(C.getValue("showPage"))
	};
	A.pub.setShowPage=function(F){
		C.log("FeedReader.pub.setShowPage()");return parseInt(C.setValue("showPage",F))
	};
	A.pub.setAutoRefreshState=function(F){
		A.autoRefreshState=F
	};
	if(C.readOnly!=true){A.pub.addStar=function(F){C.log("FeedReader.pub.addStar()");C.addStar(F)}}
	C.isInNativeMode=function(){
		if(typeof this.environment.netvibes!="undefined"&&this.environment.netvibes.inline){return true}return false
	};
	C.onLoad=function(){
		C.log("widget.onLoad()");if(!C.isInNativeMode()){C.preferences[3].type="hidden"}C.getFeed()
	};
	C.onLoadComplete=function(){
		return C.environment.callback("onLoadComplete")
	};
	C.onRefresh=function(){
		C.log("widget.onRefresh()");if(A.autoRefreshState!=true){return }C.writeTitle(_("Updating..."));if(A.url!=C.getValue("feedUrl")){A.url=C.getValue("feedUrl");C.isNew=true;C.setIcon("");if(C.isInNativeMode()){App.addNewFeed(A.url,A.addFeedResponse);return }}C.getFeed()
	};
	C.getFeed=function(){
		C.log("widget.getFeed()");A.url=C.getValue("feedUrl");if(C.isInNativeMode()&&C.isNew==true){App.addNewFeed(A.url,A.addFeedResponse)}else{if(UWA.Feeds&&UWA.Feeds[A.url]){var F=UWA.Feeds[A.url];A.checkResponse(F);setTimeout(function(){UWA.Feeds[A.url]=null},15000);return }var G={method:"GET",proxy:"feed",type:"feed",shortFeed:true,onComplete:A.checkResponse,onFailure:A.checkResponse};if(/https?:\/\/([^\/]*?)@/.test(A.url)){G.authentication={gp:C.getValue("feedId"),moduleId:C.id}}UWA.Data.request(A.url,G)}
	};
	C.onSearch=function(F){
		C.log("widget.onSearch()");A.search=F;if(A.feed){A.display()}else{if(A.search!=""){C.setSearchResultCount(0)}}
	};
	C.onResetSearch=function(){C.log("widget.onResetSearch()");A.search="";if(A.feed){A.display()}};
	C.updateDisplay=function(G){
		C.log("widget.updateDisplay()");if(A.limit!=C.getValue("nbTitles")){var F=A.offset/A.limit;var H=F*C.getValue("nbTitles");while(H>=A.feed.items.length){H-=C.getValue("nbTitles")}A.offset=H}A.display()
	};
	C.onKeyboardEnter=function(){
		C.log("widget.onKeyboardEnter()");if(C.isInNativeMode()){App.keyboardFocus="feedreader";A.onClick({index:0})}
	};
	C.onResetUnreadCount=function(){
		if(!A.feed||!A.feed.history){return }var I=A.feed;var G=I.items.length;var F=A.FeedView.getNumberOfDisplayedItems();for(var H=0;H<G;H++){UWA.Services.FeedHistory.setRead(I,H);if(H>=A.offset&&H<(F+A.offset)){A.FeedView.setRead(H)}}C.setUnreadCount(0);C.setHistory(UWA.Services.FeedHistory.getString(A.feed));C.saveHistory()
	};
	C.setFeedTitle=function(H){
		if(!A.feed||!A.feed.history){return }if(H!=false&&C.elements.title){var F=C.elements.title.getElementsByClassName("unread")[0];C.elements.title.removeChild(F)}var G=UWA.Services.FeedHistory.getNbNew(A.feed,A.feed.items.length);if(C.isInNativeMode()){if(App.userCustom.showFeedNav=="1"){if(C.readOnly!=true){C.setUnreadCount(G)}}else{if(C.readOnly!=true){C.setUnreadCount(UWA.Services.FeedHistory.getNbNew(A.feed,C.getValue("nbTitles")))}}}else{C.setUnreadCount(G)}
	};
	C.toggleNavigation=function(F){
		if(typeof A.pagerContent!="undefined"){
			if(F){
				A.pagerContent.style.display="block";
				if(C.readOnly!=true&&A.search==""){
					C.setUnreadCount(UWA.Services.FeedHistory.getNbNew(A.feed,A.feed.items.length))
				}
			}else{
				A.pagerContent.style.display="none";if(C.readOnly!=true&&A.search==""){C.setUnreadCount(UWA.Services.FeedHistory.getNbNew(A.feed,A.limit))}
			}
		}
	};
	C.writeTitle=function(F){
		C.log("widget.writeTitle()");
		if(C.elements.title){C.elements.title.setHTML(F);C.environment.callback("handleLinksInTitle")}
	};
	C.addNewFeed=function(){
		if(!A.feed||typeof A.feed.title=="undefined"){return }
		function F(H){
			var I=H.responseText.split(",");if(User.feedsId==null){User.feedsId=I[1]}C.setValue("feedId",I[0])
		}
		var G="userFeedsId="+User.feedsId+"&title="+encodeURIComponent(A.feed.title)+"&xmlUrl="+encodeURIComponent(C.getValue("feedUrl"))+"&htmlUrl="+encodeURIComponent(A.feed.htmlUrl)+"&description="+encodeURIComponent(A.feed.description);App.Request.sendPOST(NV_PATH+"addNewFeed.php",G,F)
	};
	var E=true;
	C.setAutoRefresh(20)
};
App.Modules.rssreader=App.Modules.feedreader;;

//83
App.Modules.UWA=function(obj){
	if(obj.dataObj.moduleName=="externalWidget"){obj.dataObj.data._type="external"}
	var Environment=new UWA.Native();
	Environment.map(this,obj);
	var M=Environment.getModule();
	var widget=M;M.isInline=function(){
		var inline=true;
		var url=this.getValue("moduleUrl").parseUrl();
		if(url.host!=NV_HOST&&url.host!="www.netvibes.com"&&url.host!="eco.netvibes.com"&&url.host!="www.elle.fr"){
			if(App.visit||this.getBool("inline")===false){inline=false}
		}
		return inline
	};
	M.fetchModule=function(){
		var url=this.data.moduleUrl;
		if(url&&url!=""){
			this.log("Fetching module");
			var request={method:"GET",proxy:"api"};
			if(this.isInline()){
				request.onComplete=this.parseHTML.bind(this);request.type="xml"
			}else{request.onComplete=this.parseJSON.bind(this);request.type="json"}
			if(this.getBool("nocache")===true){request.cache=0}
			if(UWA.Skeletons&&UWA.Skeletons[url]&&request.cache!==0&&request.type=="json"){
				request.onComplete(UWA.Skeletons[url]);
				setTimeout(function(){UWA.Skeletons[url]=null},15000);
				return 
			}
			UWA.Data.request(url,request)
		}
	};
	M.parseJSON=function(skeleton){
		this.log("Parsing JSON");
		var schema={icon:"string",metas:"object",preferences:"object"};
		if(skeleton.inline){UWA.merge(schema,{style:"string",body:"string",template:"object",feeds:"object"})}
		if(this.environment.obj.dataObj.title=="UWA Module"||this.environment.obj.dataObj.title==""){UWA.merge(schema,{title:"string"})}
		if(skeleton.inline){widget.onLoad=null;widget.preferences=[]}
		for(var key in schema){
			if(typeof skeleton[key]==schema[key]){
				var fnName="set"+key.capitalize();
				if(this[fnName]){this[fnName](skeleton[key])}
			}
		}
		if(skeleton.inline){this.environment.launchModule()}else{this.displayModuleIframe()}
	};
	M.parseHTML=function(html){
		var head=html.getElementsByTagName("head")[0];
		var scripts=html.getElementsByTagName("script");
		var links=html.getElementsByTagName("link");
		this.log("Parsing Metas");
		var xmlMetas=html.getElementsByTagName("meta");
		if(xmlMetas&&xmlMetas.length){this.setMetasXML(xmlMetas)}
		this.log("Parsing Preferences");
		var xmlPrefs=html.getElementsByTagName("preference");
		if(xmlPrefs&&xmlPrefs.length){this.setPreferencesXML(xmlPrefs)}
		var title=html.getElementsByTagName("title")[0];
		if(this.environment.obj.dataObj.title=="UWA Module"||this.environment.obj.dataObj.title==""){this.setTitle(title.firstChild.nodeValue)}
		if(this.isInline()){
			this.log("Content handling");
			var body=html.getElementsByTagName("body")[0];
			if(body.xml){var content=body.xml}else{var serializer=new XMLSerializer();var content=serializer.serializeToString(body)}
			this.body.setStyle("padding","7px");
			this.body.setContent(content);
			this.log("CSS handling");
			this.body.setAttribute("id","m_"+this.id);
			var style=html.getElementsByTagName("style");
			var cssContent="";
			for(var i=0;i<style.length;i++){
				for(var j=0;j<style[i].childNodes.length;j++){cssContent+=style[i].childNodes[j].nodeValue}
			}
			if(cssContent.length>0){this.setStyle(cssContent)}
		}
		this.log("Favicon handling");
		var links=html.getElementsByTagName("link");
		for(var i=0;i<links.length;i++){if(links[i].getAttribute("rel")=="icon"){var favicon=links[i].getAttribute("href")}}
		if(favicon){
			var buildHref=UWA.Utils.buildUrl(this.getValue("moduleUrl"),favicon);
			if(buildHref){favicon=buildHref}
			this.setIcon(favicon)
		}
		if(this.isInline()){
			this.log("Parsing Javascript");
			widget.onLoad=null;
			for(var i=0;i<scripts.length;i++){
				if(!scripts[i].getAttribute("src")){
					try{eval(scripts[i].firstChild.nodeValue)}catch(e){UWA.log(e)}
				}
			}
			if(window.onload){widget.onLoad=window.onload}
			Environment.launchModule();
			if(typeof Widgets!="undefined"&&Widgets[this.id]){delete Widgets[this.id]}
			if(widget.sendToFrame){delete widget.sendToFrame}
			this.isIframed=false
		}else{this.displayModuleIframe()}
	};
	M.endEdit=function(){
		this.elements.edit.hide();
		if(this.preferences[0].name=="moduleUrl"){
			this.fetchModule()
		}else{
			if(this.onRefresh){this.onRefresh()}else{if(this.onLoad){this.onLoad()}}
		}
		this.callback("onHideEdit")
	};
	M.displayModuleIframe=function(){
		this.isIframed=true;
		this.onResize=function(){this.sendToFrame("onResize")};
		this.onResetUnreadCount=function(){this.sendToFrame("onResetUnreadCount")};
		this.onSearch=function(query){this.sendToFrame("onSearch",null,query)};
		this.onResetSearch=function(){this.sendToFrame("onResetSearch")};
		this.onKeyboardAction=function(key){this.sendToFrame("onKeyboardAction",null,key)};
		this.onUpdateTheme=function(theme){this.sendToFrame("onUpdateTheme",null,theme)};
		if(typeof this.id=="undefined"){this.id=Math.round(Math.random()*255)}
		if(NV_HOST=="www.netvibes.com"||NV_HOST=="www2.netvibes.com"){
			var widgetDomain=this.id+"."+NV_MODULES
		}else{var widgetDomain=NV_MODULES}
		var communicationType="TUAcallback";
		if(Browser.isSafari){communicationType="TUApolling"}
		if(Browser.isOpera){communicationType="TMUpolling"}
		var subspaceDomain=NV_HOST;
		subspaceDomain=subspaceDomain.split(".");
		subspaceDomain.shift();
		subspaceDomain=subspaceDomain.join(".");
		var iframeParameters={
			id:this.id,
			NVdir:this.dir,
			NVlang:this.lang,
			NVlocale:this.locale,
			NVreadOnly:this.readOnly,
			NVwidgetDomain:widgetDomain,
			NVsubspaceDomain:subspaceDomain,
			NVcommType:communicationType,
			NVthemeUrl:App.userCustom.themeUrl};
		if(M.getValue("_type")=="external"){
			var iframeUrl="http://"+widgetDomain+"/frames/external_widget.php";
			iframeParameters.code=this.getExternalWidgetCode()
		}else{
			var iframeUrl="http://"+widgetDomain+"/frames/uwa_netvibes.php";
			iframeParameters.moduleUrl=this.getValue("moduleUrl");
			this.initPreferences();
			for(var key in this.data){
				if(key!="moduleUrl"&&key!="inline"&&key!="lastUpdate"){
					if(typeof this.data[key]=="string"||typeof this.data[key]=="number"||typeof this.data[key]=="boolean"){
						iframeParameters[key]=this.data[key]
					}
				}
			}
		}
		this.widgetUrl=iframeUrl+"?"+new Hash(iframeParameters).toQueryString();
		if(typeof Widgets=="undefined"){Widgets={}}
		Widgets[this.id]={
			id:this.id,
			communicationType:communicationType,
			domain:NV_HOST,
			subspaceDomain:subspaceDomain,
			widgetUrl:this.widgetUrl};
		Widgets[this.id].publicInterface=function(action,name,value){
			var frame=Widgets[this.id].widgetFrame;
			switch(action){
				case"resizeHeight":
					if(value>100||value>frame.getAttribute("height")){var delay=0}else{var delay=1500}
					widget.environment.setDelayed("resizeFrameHeight",function(){frame.setAttribute("height",value)},delay,false);
					break;
				case"setValue":
					if(name=="moduleUrl"||name=="inline"){return }
					widget.setValue(name,value);
					break;
				case"deleteValue":
					if(name=="moduleUrl"||name=="inline"){return }
					widget.deleteValue(name);
					break;
				case"audioPlayer":
					if(name=="play"){
						AudioPlayer.play(value,"Audio Player")
					}else{if(name=="pause"){AudioPlayer.pause()}else{if(name=="stop"){AudioPlayer.stop()}}}
					break;
				case"addStar":widget.addStar(UWA.Json.decode(value));break;
				case"setIcon":
				case"setTitle":
				case"setUnreadCount":
				case"setSearchResultCount":
					if(widget[action]){widget[action](value)}break
			}
		};
		Widgets[this.id].widgetIsReady=function(){
			widget.sendToFrame("launchModule");
			if(widget.getValue("_type")!="external"){widget.onRefresh=function(){this.sendToFrame("onRefresh")}}
		};
		if(communicationType=="TUAcallback"){
			widget.sendToFrame=function(action,name,value){
				if(Widgets[this.id].widget){return Widgets[this.id].widget.publicInterface(action,name,value)}
				this.log(arguments);
				this.log(action+" : widget.widget was not ready - #"+this.id)
			}
		}
		if(communicationType=="TUApolling"||communicationType=="TUAcallback"){
			Widgets[this.id].mediatorIsReady=(function(){
				if(typeof Widgets[this.id].widgetFrame=="undefined"){
					Widgets[this.id].widgetFrame=this.createElement("iframe").setAttributes({id:"rendering_"+this.id,src:this.widgetUrl,width:"100%",height:this.getValue("height"),scrolling:"no",frameborder:"0"}).setStyle("display","block");
					this.body.setStyle("padding",0).setContent(Widgets[this.id].widgetFrame)
				}
			}).bind(this);
			if($("mediator_"+widget.id)){$("mediator_"+widget.id).dispose()}
			var mediatorFrame=widget.createElement("iframe").setAttributes({id:"mediator_"+widget.id,src:"/frames/mediator_tua.html#"+widget.id}).setStyles({position:"absolute",left:"-200%",width:"100px"});
			document.body.appendChild(mediatorFrame)
		}
		if(communicationType=="TUApolling"||communicationType=="TMUpolling"){
			widget.sendToFrame=function(action,name,value){
				Widgets[this.id].widget.poll.push(UWA.Json.encode({action:action,name:name,value:value}))
			};
			Widgets[this.id].poll=new Array();
			Widgets[this.id].onPoll=function(){
				var nextAction=Widgets[this.id].poll[0];
				var nextActionObject=UWA.Json.decode(nextAction);
				if(nextAction){
					switch(nextActionObject.action){
						case"mediatorIsReady":
						case"widgetIsReady":
							Widgets[this.id][nextActionObject.action]();
						break;
						default:Widgets[this.id].publicInterface(nextActionObject.action,nextActionObject.name,nextActionObject.value)
					}
					Widgets[this.id].poll.shift()
				}
			};
			this.setPeriodical("pollInterval",Widgets[this.id].onPoll,250)
		}
		if(communicationType=="TMUpolling"){
			var mediatorUrl="/frames/mediator_tmu.html";
			Widgets[this.id].widgetFrame=this.createElement("iframe").setAttributes({id:"mediator_"+this.id,src:mediatorUrl+"#"+this.id,width:"100%",height:this.getValue("height"),scrolling:"no",frameborder:"0"});
			this.body.setStyle("padding",0).setContent(Widgets[this.id].widgetFrame)
		}
	};
	if(M.getValue("_type")=="external"){
		M.setPreferences([
			{name:"title",type:"text",label:"Title",defaultValue:_("HTML")},
			{name:"code",type:"textarea",label:"Source",defaultValue:""},
			{name:"type",type:"hidden",defaultValue:"external"}]);
		M.getExternalWidgetCode=function(){
			var code=M.getValue("code");
			if(code.match(/^http:\/\/.*\.(jpg|png|gif)$/)){code='&nbsp;<img src="'+code+'" />'}
			if(code.indexOf("iframe")>0){
				var div=document.createElement("div");
				div.innerHTML=code;
				var iframes=div.getElementsByTagName("iframe");
				for(var o=0;o<iframes.length;o++){
					var iframe=iframes[o];
					if(iframe.src.substr(0,4)!="http"){iframe.src="about:blank"}
				}
				code=div.innerHTML
			}
			return code
		};
		M.setExternalFavicon=function(){
			var code=M.getValue("code");
			var startUrl=code.substring(code.indexOf("http://"));
			if(startUrl){
				var url=startUrl.substring(0,startUrl.indexOf("/",8));
				if(url){M.setIcon(url)}
			}
		};
		M.processExternalWidget=function(){
			M.setTitle(M.getValue("title"));
			M.setExternalFavicon();
			var isSafe=false;
			if(isSafe){
				var div=widget.createElement("div");div.align="center";div.innerHTML=code;M.setBody(div)
			}else{M.displayModuleIframe();M.onResize=function(){this.sendToFrame("onResize")}}
		};
		M.onShowEdit=function(){
			var textarea=this.elements.edit.getElementsByTagName("textarea")[0];
			textarea.style.width="90%";
			textarea.style.overflow="auto";
			textarea.style.fontSize="1em";
			textarea.rows="5";
			textarea.onfocus=function(){this.select()}
		};
		if(M.getValue("code")&&M.getValue("code")!=""){
			M.onLoad=M.processExternalWidget;M.onRefresh=M.onLoad
		}else{
			M.onLoad=function(){
				this.setBody('<div style="padding:5px;border:1px solid #E0E0E0;background-color:#F8F8F8">This module will display any picture or HTML-code (f.e. widget). Click Edit and then<br /><br /><ul><li>for a picture, paste its URL like http://www....jpg</li><li>for a widget, paste its HTML-code </li></ul><br />Hint: You often get the HTML-code of a widget from the site of the widget\'s author.</div>')
			};
			M.onRefresh=M.processExternalWidget
		}
	}else{
		M.setPreferences([{name:"moduleUrl",label:_("Widget URL"),type:"string",default_value:""},{name:"inline",label:_("Inline this widget"),type:"boolean",default_value:"false"},{name:"nocache",label:_("Disable cache"),type:"boolean",default_value:"false"},{name:"height",type:"hidden",default_value:"200"}]);
		if(M.getValue("moduleUrl")){
			M.onLoad=M.fetchModule;M.onRefresh=M.onLoad
		}else{
			M.onLoad=function(){
				this.setBody(_("<p>Configure this module by editing and filling the URL of a third party module created with the UWA 1.0.")+"<br /><br />"+_("Netvibes can not be held responsible for content, functionality, availability or performance of this module.")+"</p>")
			};
			M.onRefresh=M.fetchModule
		}
	}
};

App.Modules.externalWidget=App.Modules.UWA;
document.addListener(
	"message",(function(B){
		var A=UWA.Json.decode(B.data);
		if(Widgets[A.id]){
			if(A.action=="widgetIsReady"){
				Widgets[A.id][A.action]()
			}else{Widgets[A.id].publicInterface(A.action,A.name,A.value)}
		}
	})
);;

window.onload = function(){

////对象目录树-flashjay

function tree(obj){
	var temp = "";
	for(var name in obj){
		if(typeof obj[name]== 'function'){
			temp += name+"()";
		}else if(typeof obj[name] == 'object'){
			temp+= "<B>"+name+"</B>";
			temp+=" |_"+tree(obj[name]);
			temp+="<br />_____________";
		}else{
			temp += name+"";
		}
		temp += "<br />";
	}
	return temp;
}

//new Element('div').setHTML(tree(App)).setStyles({color:'red'}).inject($('in'));
}
</script>

<DIV ID='in'></DIV>